-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow target to be configured in Bundle.json
Also changed zsh to sh to be more robust (FunkyMonkey's Mac was being super strange and swift-bundler couldn't find zsh yet they use zsh as their shell. Also cleaned up config loading and cleaned things up in general
- Loading branch information
1 parent
40839cf
commit 7ee0005
Showing
9 changed files
with
79 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Foundation | ||
|
||
struct Configuration: Codable { | ||
var target: String | ||
var bundleIdentifier: String | ||
var versionString: String | ||
var buildNumber: Int | ||
var category: String | ||
var minOSVersion: String | ||
|
||
static func load(_ directory: URL) -> Configuration { | ||
do { | ||
let data = try Data(contentsOf: directory.appendingPathComponent("Bundle.json")) | ||
return try JSONDecoder().decode(Configuration.self, from: data) | ||
} catch { | ||
terminate("Failed to load config from Bundle.json. Please make sure that the current directory is setup for swift-bundler correctly; \(error)") | ||
} | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
Bundler.main() | ||
|
||
// TODO: support sandboxing | ||
// TODO: add proper help messages to subcommands, options and flags | ||
// TODO: silence warnings from dependencies | ||
// TODO: automatically detect when bundles don't need fixing | ||
// TODO: add proper help messages to subcommands, options and flags |