Fix rocket steps decoding

This commit is contained in:
Franco Meloni 2019-04-19 10:08:57 +01:00
parent 717bdb08f6
commit 2c4c22bb21
4 changed files with 8 additions and 8 deletions

View File

@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/orta/Komondor.git",
"state": {
"branch": null,
"revision": "265fd04de2316edc72d9065d2ef5118b20a71187",
"version": "1.0.2"
"revision": "3cd6d76887816ead5931ddbfb249c2935f518e17",
"version": "1.0.4"
}
},
{

View File

@ -31,8 +31,8 @@ if let rocketYamlPath = RocketFileFinder.rocketFilePath() {
}
stepsDictionary = loadedDictionary
} else if let rocketConfig = try? PackageConfiguration.load() {
stepsDictionary = rocketConfig.configuration
} else if let rocketConfig = try? PackageConfiguration.load().configuration["rocket"] as? [String: Any] {
stepsDictionary = rocketConfig
} else {
stepsDictionary = [:]
}

View File

@ -16,7 +16,7 @@ struct CurrentVersionProvider: CurrentVersionProviding {
}
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)

View File

@ -27,7 +27,7 @@ final class StepsParserTests: XCTestCase {
["push": ["remote": "testRemote", "branch": "testBranch"]],
["hide_dev_dependencies": ["package_path": "testPackage.swift"]],
"unhide_dev_dependencies",
]]
]]
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
@ -49,7 +49,7 @@ final class StepsParserTests: XCTestCase {
[],
["commit": ["message": "message"]],
"push",
]]
]]
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)
@ -67,7 +67,7 @@ final class StepsParserTests: XCTestCase {
"Scripts/script",
["commit": ["message": "message"]],
"push",
]]
]]
let steps = StepsParser.parseSteps(fromDictionary: dictionary, logger: logger)