Merge pull request #46 from shibapm/update_dependencies

Update dependencies
This commit is contained in:
Franco Meloni 2021-12-21 21:16:40 +00:00 committed by GitHub
commit 2e0d20cd9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 82 additions and 75 deletions

View File

@ -2,21 +2,12 @@
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"package": "Komondor",
"repositoryURL": "https://github.com/shibapm/Komondor.git",
"state": {
"branch": null,
"revision": "7cd2f8cacc4d22f21bc0b2309c3b18acf7957b66",
"version": "1.2.0"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "c228db5d2ad1b01ebc84435e823e6cca4e3db98b",
"version": "1.2.0"
"revision": "90b087b1e39069684b1ff4bf915c2aae594f2d60",
"version": "1.1.3"
}
},
{
@ -33,8 +24,8 @@
"repositoryURL": "https://github.com/Quick/Nimble",
"state": {
"branch": null,
"revision": "6abeb3f5c03beba2b9e4dbe20886e773b5b629b6",
"version": "8.0.4"
"revision": "7a46a5fc86cb917f69e3daf79fcb045283d8f008",
"version": "8.1.2"
}
},
{
@ -42,8 +33,8 @@
"repositoryURL": "https://github.com/shibapm/PackageConfig.git",
"state": {
"branch": null,
"revision": "6e7b59d8d2ab62c1725d205dd2074316e981379a",
"version": "1.0.0"
"revision": "7081db0a7ad0ce6002115944c26c915167dc0617",
"version": "1.1.2"
}
},
{
@ -51,8 +42,17 @@
"repositoryURL": "https://github.com/Quick/Quick",
"state": {
"branch": null,
"revision": "33682c2f6230c60614861dfc61df267e11a1602f",
"version": "2.2.0"
"revision": "8cce6acd38f965f5baa3167b939f86500314022b",
"version": "3.1.2"
}
},
{
"package": "ShellOut",
"repositoryURL": "https://github.com/JohnSundell/ShellOut.git",
"state": {
"branch": null,
"revision": "e1577acf2b6e90086d01a6d5e2b8efdaae033568",
"version": "2.3.0"
}
},
{
@ -60,8 +60,8 @@
"repositoryURL": "https://github.com/nicklockwood/SwiftFormat.git",
"state": {
"branch": null,
"revision": "b564570c139d1c36292e8a5bb08d4ba6818b0a91",
"version": "0.43.0"
"revision": "fab94f3ca17f0f75e87787ed83b3a9423348b14c",
"version": "0.49.1"
}
},
{
@ -69,8 +69,8 @@
"repositoryURL": "https://github.com/kareman/SwiftShell",
"state": {
"branch": null,
"revision": "a6014fe94c3dbff0ad500e8da4f251a5d336530b",
"version": "5.1.0-beta.1"
"revision": "99680b2efc7c7dbcace1da0b3979d266f02e213c",
"version": "5.1.0"
}
},
{
@ -78,8 +78,8 @@
"repositoryURL": "https://github.com/f-meloni/TestSpy",
"state": {
"branch": null,
"revision": "e2970747d5d2d280367b446cbd8d1f8c154333b4",
"version": "0.4.1"
"revision": "63398d17c70ba7419cec78834f22be86b850643b",
"version": "0.5.0"
}
},
{
@ -87,8 +87,8 @@
"repositoryURL": "https://github.com/jpsim/Yams",
"state": {
"branch": null,
"revision": "9003d51672e516cc59297b7e96bff1dfdedcb4ea",
"version": "4.0.4"
"revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa",
"version": "4.0.6"
}
}
]

View File

@ -16,12 +16,12 @@ let package = Package(
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/jpsim/Yams", from: "4.0.0"),
.package(url: "https://github.com/shibapm/Logger", from: "0.2.2"),
.package(url: "https://github.com/kareman/SwiftShell", .exact("5.1.0-beta.1")),
.package(url: "https://github.com/kareman/SwiftShell", from: "5.1.0"),
.package(url: "https://github.com/shibapm/PackageConfig.git", from: "1.0.0"),
// Dev Dependencies for testing.setup
.package(url: "https://github.com/Quick/Nimble", from: "8.0.0"), // dev
.package(url: "https://github.com/f-meloni/TestSpy", from: "0.3.1"), // dev
// .package(url: "https://github.com/shibapm/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
],
targets: [

View File

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

View File

@ -12,7 +12,8 @@ public enum ChecksParser {
private static func parseElement(_ element: Any) -> Check? {
if let string = element as? String,
let check = PreReleseCheck(rawValue: string) {
let check = PreReleseCheck(rawValue: string)
{
return check.check(dictionary: nil)
} else {
return nil

View File

@ -4,7 +4,8 @@ import Logger
final class BranchExecutor: ScriptLauncherExecutor<BranchParameters> {
override func executeStep(version: String, logger: Logger) {
guard let branchName = parameters.name,
!branchName.isEmpty else {
!branchName.isEmpty
else {
logger.logError("Invalid branch name")
return
}

View File

@ -4,7 +4,8 @@ import Logger
final class ScriptExecutor: ScriptLauncherExecutor<ScriptParameters> {
override func executeStep(version: String, logger: Logger) {
guard let content = parameters.content,
!content.isEmpty else {
!content.isEmpty
else {
logger.logError("Invalid script content")
return
}

View File

@ -2,6 +2,6 @@ import Foundation
extension Dictionary {
subscript<T: RawRepresentable, R>(rawRappresentable: T) -> R? where T.RawValue == Key {
return self[rawRappresentable.rawValue] as? R
self[rawRappresentable.rawValue] as? R
}
}

View File

@ -1,12 +1,13 @@
import Foundation
public final class RocketFileFinder {
public enum RocketFileFinder {
static let rocketFileParameter = "--rocket-file"
static let defaultRocketFilePath = ".rocket.yml"
public static func rocketFilePath(args: [String] = CommandLine.arguments, fileManager: FileManager = .default) -> String? {
if let index = args.firstIndex(of: rocketFileParameter),
index < args.count - 1 {
index < args.count - 1
{
return args[index + 1]
} else if fileManager.fileExists(atPath: defaultRocketFilePath) {
return defaultRocketFilePath

View File

@ -38,7 +38,8 @@ public enum StepsParser {
return Step.script.executor(dictionary: [ScriptParameters.CodingKeys.content.rawValue: string])
}
} else if let stepDict = element as? [String: Any],
let step = step(fromDictionary: stepDict) {
let step = step(fromDictionary: stepDict)
{
return step.executor(dictionary: stepDict[step.rawValue] as? [String: Any])
} else {
logger.logWarning("Invalid step found")
@ -61,7 +62,8 @@ public enum StepsParser {
private static func step(fromDictionary dictionary: [String: Any]) -> Step? {
guard let stepString = dictionary.keys.first,
dictionary.keys.count == 1 else {
dictionary.keys.count == 1
else {
return nil
}

View File

@ -17,7 +17,7 @@ public enum VersionBumpOption: String {
func newVersion(currentVersion: String) -> String {
var versionComponent = currentVersion.split(separator: ".").map { String($0) }
let componentIndex = self.index
let componentIndex = index
let newComponent = Int(versionComponent[componentIndex])?.advanced(by: 1) ?? 0
versionComponent[componentIndex] = newComponent.description

View File

@ -2,8 +2,8 @@
import XCTest
extension BranchExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__BranchExecutorTests = [
("testItSendsEmptyScriptIfTheDictionaryIsNil", testItSendsEmptyScriptIfTheDictionaryIsNil),
@ -13,8 +13,8 @@
}
extension ChecksParserTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ChecksParserTests = [
("testItIgnoresTheInvalidSteps", testItIgnoresTheInvalidSteps),
@ -23,8 +23,8 @@
}
extension CleanGitStatusCheckTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__CleanGitStatusCheckTests = [
("testReturnsFailureWhenThereIsAreModifiedFiles", testReturnsFailureWhenThereIsAreModifiedFiles),
@ -33,8 +33,8 @@
}
extension CommitExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__CommitExecutorTests = [
("testItSetsTheParameterIfTheGitHookFolderExists", testItSetsTheParameterIfTheGitHookFolderExists),
@ -45,8 +45,8 @@
}
extension CurrentVersionProviderTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__CurrentVersionProviderTests = [
("testItReturnsTheCorrectTag", testItReturnsTheCorrectTag),
@ -55,8 +55,8 @@
}
extension DefaultExecutorStepDescriptionTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__DefaultExecutorStepDescriptionTests = [
("testItShowsTheCorrectEndDescriptionWhenThereAreNoParameters", testItShowsTheCorrectEndDescriptionWhenThereAreNoParameters),
@ -67,8 +67,8 @@
}
extension DevDependenciesModifierTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__DevDependenciesModifierTests = [
("testItHidesTheDependenciesCorrectly", testItHidesTheDependenciesCorrectly),
@ -77,8 +77,8 @@
}
extension GitAddExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__GitAddExecutorTests = [
("testItDoesntSendAnyCommandToTheScriptLauncherIfTheDictionaryIsNil", testItDoesntSendAnyCommandToTheScriptLauncherIfTheDictionaryIsNil),
@ -88,8 +88,8 @@
}
extension HideDevDependenciesExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__HideDevDependenciesExecutorTests = [
("testItSendsTheHideDependenciesCallToTheDevDependenciesModifier", testItSendsTheHideDependenciesCallToTheDevDependenciesModifier),
@ -98,8 +98,8 @@
}
extension NewVersionProviderTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__NewVersionProviderTests = [
("testReturnsTheCorrectNewVersion", testReturnsTheCorrectNewVersion),
@ -107,8 +107,8 @@
}
extension PushExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__PushExecutorTests = [
("testItAddsTheNoVerifyParameterIfGitHookFolderIsPresent", testItAddsTheNoVerifyParameterIfGitHookFolderIsPresent),
@ -119,8 +119,8 @@
}
extension RocketFileFinderTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__RocketFileFinderTests = [
("testItReturnsNilIfThereAreNoArgumentsAndTheDefaultFileDoesntExist", testItReturnsNilIfThereAreNoArgumentsAndTheDefaultFileDoesntExist),
@ -130,8 +130,8 @@
}
extension ScriptExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ScriptExecutorTests = [
("testItDoesntSendAnyCommandToTheScriptLauncherIfTheContentIsEmpty", testItDoesntSendAnyCommandToTheScriptLauncherIfTheContentIsEmpty),
@ -142,8 +142,8 @@
}
extension ScriptLauncherTestCase {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ScriptLauncherTestCase = [
("testItUsesAWorkaroundToGenerateTheTestsOnLinux", testItUsesAWorkaroundToGenerateTheTestsOnLinux),
@ -151,8 +151,8 @@
}
extension StepsParserTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__StepsParserTests = [
("testItCreatesAScriptStepForNotRecognisedStrings", testItCreatesAScriptStepForNotRecognisedStrings),
@ -166,8 +166,8 @@
}
extension SwiftScriptExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__SwiftScriptExecutorTests = [
("testItCreatesTheCorrectProcess", testItCreatesTheCorrectProcess),
@ -177,8 +177,8 @@
}
extension TagExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__TagExecutorTests = [
("testItSendsTheCorrectScriptToTheScriptLauncher", testItSendsTheCorrectScriptToTheScriptLauncher),
@ -187,8 +187,8 @@
}
extension UnhideDevDependenciesExecutorTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__UnhideDevDependenciesExecutorTests = [
("testItSendsTheHideDependenciesCallToTheDevDependenciesModifier", testItSendsTheHideDependenciesCallToTheDevDependenciesModifier),