-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Archive supporting sources in release workflow (#261)
Adds a step to the build release artifacts job to archive the supporting sources at `Sources/MockingbirdSupport` along with the license file.
- Loading branch information
1 parent
bc939ec
commit 6dc68a8
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Sources/MockingbirdAutomationCli/Commands/BuildSupportingSources.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import ArgumentParser | ||
import Foundation | ||
import MockingbirdAutomation | ||
import PathKit | ||
|
||
extension Build { | ||
struct BuildSupportingSources: ParsableCommand { | ||
static var configuration = CommandConfiguration( | ||
commandName: "supporting", | ||
abstract: "Build a supporting source files bundle.") | ||
|
||
@OptionGroup() | ||
var globalOptions: Options | ||
|
||
func run() throws { | ||
guard let location = globalOptions.archiveLocation else { | ||
logError("You must specify an archive location when building supporting sources") | ||
return | ||
} | ||
let modules = try Path("Sources/MockingbirdSupport").children() | ||
try archive(artifacts: modules.map({ ("", $0) }), destination: Path(location)) | ||
} | ||
} | ||
} |