Merge pull request #39 from shibapm/f-meloni-patch-1

Use toolchain 5.1
This commit is contained in:
Franco Meloni 2020-05-08 20:56:11 +01:00 committed by GitHub
commit a3aab25f93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 21 additions and 21 deletions

View File

@ -1 +1 @@
5.0 5.1

View File

@ -2,7 +2,7 @@ language: generic
matrix: matrix:
include: include:
- os: osx - os: osx
osx_image: xcode10.2 osx_image: xcode11.4
script: script:
- swift test - swift test
- swift build --disable-sandbox -c release - swift build --disable-sandbox -c release
@ -14,7 +14,7 @@ matrix:
dist: trusty dist: trusty
install: install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
- swiftenv global 5.0 - swiftenv global 5.1
script: script:
- swift test - swift test
- swift build --disable-sandbox -c release - swift build --disable-sandbox -c release

View File

@ -1,4 +1,4 @@
// swift-tools-version:5.0 // swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package. // The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription import PackageDescription

View File

@ -2,7 +2,7 @@ enum PreReleseCheck: String {
case cleanGit = "clean_git" case cleanGit = "clean_git"
func check(dictionary _: [String: Any]?) -> Check { func check(dictionary _: [String: Any]?) -> Check {
return checkType.init() checkType.init()
} }
private var checkType: Check.Type { private var checkType: Check.Type {

View File

@ -14,7 +14,7 @@ protocol ScriptLaunching {
extension ScriptLaunching { extension ScriptLaunching {
@discardableResult @discardableResult
func launchScript(withContent content: String) throws -> String { func launchScript(withContent content: String) throws -> String {
return try launchScript(withContent: content, version: nil) try launchScript(withContent: content, version: nil)
} }
} }

View File

@ -42,14 +42,14 @@ struct DevDependenciesModifier: DevDependenciesModifing {
} }
private func hideDependencyOnLine(_ line: String) -> String { private func hideDependencyOnLine(_ line: String) -> String {
return commentString + line commentString + line
} }
private func unhideDependencyOnLine(_ line: String) -> String { private func unhideDependencyOnLine(_ line: String) -> String {
return String(line[String.Index(utf16Offset: 2, in: line) ..< line.endIndex]) String(line[String.Index(utf16Offset: 2, in: line) ..< line.endIndex])
} }
private func isDevDependencyLine(line: String) -> Bool { private func isDevDependencyLine(line: String) -> Bool {
return line.contains("// dev") || line.contains("//dev") line.contains("// dev") || line.contains("//dev")
} }
} }

View File

@ -7,7 +7,7 @@ protocol NoVerifyParameterInserting {
extension NoVerifyParameterInserting { extension NoVerifyParameterInserting {
func insertNoVerifyParameterIfNeeded(string: String, noVerifyParameter: Bool?) -> String { func insertNoVerifyParameterIfNeeded(string: String, noVerifyParameter: Bool?) -> String {
return shouldAddNoVerifyParameter(noVerifyParameter: noVerifyParameter) ? string + " --no-verify" : string shouldAddNoVerifyParameter(noVerifyParameter: noVerifyParameter) ? string + " --no-verify" : string
} }
private func shouldAddNoVerifyParameter(noVerifyParameter: Bool?) -> Bool { private func shouldAddNoVerifyParameter(noVerifyParameter: Bool?) -> Bool {

View File

@ -10,7 +10,7 @@ public enum Step: String {
case swiftScript = "swift_script" case swiftScript = "swift_script"
func executor(dictionary: [String: Any]?) -> StepExecutor { func executor(dictionary: [String: Any]?) -> StepExecutor {
return executorType.init(step: self, dictionary: dictionary) executorType.init(step: self, dictionary: dictionary)
} }
private var executorType: StepExecutor.Type { private var executorType: StepExecutor.Type {

View File

@ -19,7 +19,7 @@ final class BranchExecutorTests: ScriptLauncherTestCase {
} }
private func givenABranchExecutor(dictionary: [String: Any]?) -> BranchExecutor { private func givenABranchExecutor(dictionary: [String: Any]?) -> BranchExecutor {
return BranchExecutor(step: .branch, dictionary: dictionary, scriptLauncher: scriptLauncher) BranchExecutor(step: .branch, dictionary: dictionary, scriptLauncher: scriptLauncher)
} }
private func executeStep(withDictionary dictionary: [String: Any]?) { private func executeStep(withDictionary dictionary: [String: Any]?) {

View File

@ -36,7 +36,7 @@ final class DevDependenciesModifierTests: XCTestCase {
} }
private var devDependencyPackage: String { private var devDependencyPackage: String {
return """ """
// swift-tools-version:4.2 // swift-tools-version:4.2
import PackageDescription import PackageDescription
@ -70,7 +70,7 @@ final class DevDependenciesModifierTests: XCTestCase {
} }
private var hiddenDevDependencyPackage: String { private var hiddenDevDependencyPackage: String {
return """ """
// swift-tools-version:4.2 // swift-tools-version:4.2
import PackageDescription import PackageDescription

View File

@ -19,7 +19,7 @@ final class GitAddExecutorTests: ScriptLauncherTestCase {
} }
private func givenAGitAddExecutor(dictionary: [String: Any]?) -> GitAddExecutor { private func givenAGitAddExecutor(dictionary: [String: Any]?) -> GitAddExecutor {
return GitAddExecutor(step: .gitAdd, dictionary: dictionary, scriptLauncher: scriptLauncher) GitAddExecutor(step: .gitAdd, dictionary: dictionary, scriptLauncher: scriptLauncher)
} }
private func executeStep(withDictionary dictionary: [String: Any]?) { private func executeStep(withDictionary dictionary: [String: Any]?) {

View File

@ -23,6 +23,6 @@ final class NewVersionProviderTests: XCTestCase {
private class FakeCurrentVersionProvider: CurrentVersionProviding { private class FakeCurrentVersionProvider: CurrentVersionProviding {
func currentVersion() throws -> String { func currentVersion() throws -> String {
return "1.1.1" "1.1.1"
} }
} }

View File

@ -26,7 +26,7 @@ final class ScriptExecutorTests: ScriptLauncherTestCase {
} }
private func givenAScriptExecutor(dictionary: [String: Any]?) -> ScriptExecutor { private func givenAScriptExecutor(dictionary: [String: Any]?) -> ScriptExecutor {
return ScriptExecutor(step: .script, dictionary: dictionary, scriptLauncher: scriptLauncher) ScriptExecutor(step: .script, dictionary: dictionary, scriptLauncher: scriptLauncher)
} }
private func executeStep(withDictionary dictionary: [String: Any]?) { private func executeStep(withDictionary dictionary: [String: Any]?) {

View File

@ -145,7 +145,7 @@ final class StepsParserTests: XCTestCase {
extension PushParameters: Equatable { extension PushParameters: Equatable {
public static func == (lhs: PushParameters, rhs: PushParameters) -> Bool { public static func == (lhs: PushParameters, rhs: PushParameters) -> Bool {
return lhs.branch == rhs.branch && lhs.branch == rhs.branch &&
lhs.remote == rhs.remote lhs.remote == rhs.remote
} }
} }

View File

@ -10,6 +10,6 @@ final class SpyPrinter: Printing {
extension Logger { extension Logger {
static var testLogger: Logger { static var testLogger: Logger {
return Logger(printer: SpyPrinter()) Logger(printer: SpyPrinter())
} }
} }

View File

@ -4,6 +4,6 @@ final class StubbedFileManager: FileManager {
var fileExistsResult = true var fileExistsResult = true
override func fileExists(atPath _: String) -> Bool { override func fileExists(atPath _: String) -> Bool {
return fileExistsResult fileExistsResult
} }
} }

View File

@ -197,7 +197,7 @@
} }
public func __allTests() -> [XCTestCaseEntry] { public func __allTests() -> [XCTestCaseEntry] {
return [ [
testCase(BranchExecutorTests.__allTests__BranchExecutorTests), testCase(BranchExecutorTests.__allTests__BranchExecutorTests),
testCase(ChecksParserTests.__allTests__ChecksParserTests), testCase(ChecksParserTests.__allTests__ChecksParserTests),
testCase(CleanGitStatusCheckTests.__allTests__CleanGitStatusCheckTests), testCase(CleanGitStatusCheckTests.__allTests__CleanGitStatusCheckTests),