Merge pull request #29 from shibapm/fix_rocket_step_decoding
Fix rocket step decoding
This commit is contained in:
commit
605a3f4525
|
@ -6,8 +6,8 @@
|
||||||
"repositoryURL": "https://github.com/orta/Komondor.git",
|
"repositoryURL": "https://github.com/orta/Komondor.git",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "265fd04de2316edc72d9065d2ef5118b20a71187",
|
"revision": "3cd6d76887816ead5931ddbfb249c2935f518e17",
|
||||||
"version": "1.0.2"
|
"version": "1.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,11 +17,11 @@ let package = Package(
|
||||||
.package(url: "https://github.com/jpsim/Yams", from: "1.0.0"),
|
.package(url: "https://github.com/jpsim/Yams", from: "1.0.0"),
|
||||||
.package(url: "https://github.com/f-meloni/Logger", from: "0.2.2"),
|
.package(url: "https://github.com/f-meloni/Logger", from: "0.2.2"),
|
||||||
.package(url: "https://github.com/kareman/SwiftShell", from: "4.1.0"),
|
.package(url: "https://github.com/kareman/SwiftShell", from: "4.1.0"),
|
||||||
.package(url: "https://github.com/orta/PackageConfig.git", from: "0.0.1"),
|
.package(url: "https://github.com/shibapm/PackageConfig.git", from: "0.10.0"),
|
||||||
// Dev Dependencies for testing.setup
|
// Dev Dependencies for testing.setup
|
||||||
.package(url: "https://github.com/Quick/Nimble", from: "7.3.1"), // dev
|
.package(url: "https://github.com/Quick/Nimble", from: "7.3.1"), // dev
|
||||||
.package(url: "https://github.com/f-meloni/TestSpy", from: "0.3.1"), // dev
|
.package(url: "https://github.com/f-meloni/TestSpy", from: "0.3.1"), // dev
|
||||||
.package(url: "https://github.com/orta/Komondor.git", from: "1.0.0"), // dev
|
.package(url: "https://github.com/shibapm/Komondor.git", from: "1.0.0"), // dev
|
||||||
.package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.35.8"), // dev
|
.package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.35.8"), // dev
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
|
|
|
@ -31,8 +31,8 @@ if let rocketYamlPath = RocketFileFinder.rocketFilePath() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stepsDictionary = loadedDictionary
|
stepsDictionary = loadedDictionary
|
||||||
} else if let rocketConfig = try? PackageConfiguration.load() {
|
} else if let rocketConfig = try? PackageConfiguration.load().configuration["rocket"] as? [String: Any] {
|
||||||
stepsDictionary = rocketConfig.configuration
|
stepsDictionary = rocketConfig
|
||||||
} else {
|
} else {
|
||||||
stepsDictionary = [:]
|
stepsDictionary = [:]
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ struct CurrentVersionProvider: CurrentVersionProviding {
|
||||||
}
|
}
|
||||||
|
|
||||||
func currentVersion() throws -> String {
|
func currentVersion() throws -> String {
|
||||||
let tags = try scriptLauncher.launchScript(withContent: "git tag --sort=-v:refname", version: nil).split(separator: "\n").lazy.map({ String($0) })
|
let tags = try scriptLauncher.launchScript(withContent: "git tag --sort=-v:refname", version: nil).split(separator: "\n").lazy.map { String($0) }
|
||||||
|
|
||||||
let regex = try NSRegularExpression(pattern: "\\d.\\d.\\d", options: .caseInsensitive)
|
let regex = try NSRegularExpression(pattern: "\\d.\\d.\\d", options: .caseInsensitive)
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class StepsParserTests: XCTestCase {
|
||||||
["push": ["remote": "testRemote", "branch": "testBranch"]],
|
["push": ["remote": "testRemote", "branch": "testBranch"]],
|
||||||
["hide_dev_dependencies": ["package_path": "testPackage.swift"]],
|
["hide_dev_dependencies": ["package_path": "testPackage.swift"]],
|
||||||
"unhide_dev_dependencies",
|
"unhide_dev_dependencies",
|
||||||
]]
|
]]
|
||||||
|
|
||||||
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
|
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ final class StepsParserTests: XCTestCase {
|
||||||
[],
|
[],
|
||||||
["commit": ["message": "message"]],
|
["commit": ["message": "message"]],
|
||||||
"push",
|
"push",
|
||||||
]]
|
]]
|
||||||
|
|
||||||
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
|
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ final class StepsParserTests: XCTestCase {
|
||||||
"Scripts/script",
|
"Scripts/script",
|
||||||
["commit": ["message": "message"]],
|
["commit": ["message": "message"]],
|
||||||
"push",
|
"push",
|
||||||
]]
|
]]
|
||||||
|
|
||||||
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
|
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue