From f2e638725f356c70101a14beeb4735bedde92d7b Mon Sep 17 00:00:00 2001 From: noppoman Date: Wed, 15 Aug 2018 15:50:05 +0900 Subject: [PATCH 1/2] Support Swift 4.1 and no longer support Swift 3 --- .travis.yml | 2 +- Package.resolved | 70 +++++++++++++++++++++---------------------- Package.swift | 36 ++++++++++++++-------- Package@swift-4.swift | 32 -------------------- 4 files changed, 60 insertions(+), 80 deletions(-) delete mode 100644 Package@swift-4.swift diff --git a/.travis.yml b/.travis.yml index 60b1b6f..80ac216 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: language: generic sudo: required dist: trusty -osx_image: xcode9 +osx_image: xcode9.4 install: - source Scripts/install-swift.sh diff --git a/Package.resolved b/Package.resolved index 60ea9cf..fdafc80 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,13 +1,22 @@ { "object": { "pins": [ + { + "package": "SwiftAWSApigateway", + "repositoryURL": "https://github.com/swift-aws/apigateway.git", + "state": { + "branch": null, + "revision": "2924aecd232deee56cd14cfb1ea54a0fdce6a2f0", + "version": "1.1.6" + } + }, { "package": "AWSSDKSwiftCore", "repositoryURL": "https://github.com/noppoMan/aws-sdk-swift-core.git", "state": { "branch": null, - "revision": "4e83cdf53a95d648016889dc602b4e7bf897d5a7", - "version": "1.0.8" + "revision": "48298a7bec6c838553f314cb48c81f2a363e8253", + "version": "1.0.10" } }, { @@ -38,48 +47,39 @@ } }, { - "package": "Prorsum", - "repositoryURL": "https://github.com/noppoMan/Prorsum.git", - "state": { - "branch": null, - "revision": "c1bbe27eedf53121237854b3aa393237a4e973fe", - "version": "0.3.2" - } - }, - { - "package": "ProrsumNet", - "repositoryURL": "https://github.com/noppoman/ProrsumNet.git", + "package": "SwiftAWSIam", + "repositoryURL": "https://github.com/swift-aws/iam.git", "state": { "branch": null, - "revision": "941e0c65df620467130e9eb2496a3c1275c1d307", - "version": "0.1.3" + "revision": "7f0ce270eb8f856561b3097dad1d980f9b202213", + "version": "1.1.6" } }, { - "package": "SwiftAWSApigateway", - "repositoryURL": "https://github.com/swift-aws/apigateway.git", + "package": "SwiftAWSLambda", + "repositoryURL": "https://github.com/swift-aws/lambda.git", "state": { "branch": null, - "revision": "37222385adb15120ff03396b20ca6b9dd783bc4a", - "version": "1.1.3" + "revision": "ca7f24e1567ae6b58d1816bbb26fe8bad6ff6534", + "version": "1.1.6" } }, { - "package": "SwiftAWSIam", - "repositoryURL": "https://github.com/swift-aws/iam.git", + "package": "Prorsum", + "repositoryURL": "https://github.com/noppoMan/Prorsum.git", "state": { "branch": null, - "revision": "b64000f258c082f22212161a3014c1bf02ebce91", - "version": "1.1.3" + "revision": "b278e88142a3b5a87feabc44b6522dabfcda8f99", + "version": "0.3.3" } }, { - "package": "SwiftAWSLambda", - "repositoryURL": "https://github.com/swift-aws/lambda.git", + "package": "ProrsumNet", + "repositoryURL": "https://github.com/noppoman/ProrsumNet.git", "state": { "branch": null, - "revision": "675cd8d8a223a34abc3895c8eed5a5a6648949d2", - "version": "1.1.3" + "revision": "941e0c65df620467130e9eb2496a3c1275c1d307", + "version": "0.1.3" } }, { @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/swift-aws/s3.git", "state": { "branch": null, - "revision": "08540d9c6a6a1e54d2297aa57cf2a033e3258493", - "version": "1.1.3" + "revision": "9deea717490c08c5dac87e8b818cbdb2b227c7e6", + "version": "1.1.6" } }, { @@ -96,8 +96,8 @@ "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", "state": { "branch": null, - "revision": "8e5916bfcc7f8acee6fb2cb36d1ffefb02ac2460", - "version": "3.1.0" + "revision": "37f4a7f863f6fe76ce44fc0023f331eea0089beb", + "version": "5.2.0" } }, { @@ -105,8 +105,8 @@ "repositoryURL": "https://github.com/IBM-Swift/SwiftyJSON.git", "state": { "branch": null, - "revision": "1190845cf7d25a5c8ea7653fe03dcdd39a082056", - "version": "16.0.2" + "revision": "693d2d28fe2f91aedf02c3754baade625fd97c46", + "version": "17.0.2" } }, { @@ -114,8 +114,8 @@ "repositoryURL": "https://github.com/behrang/YamlSwift.git", "state": { "branch": null, - "revision": "901c4943f3206afb3b965bad2d1338e3c4fdbeba", - "version": "3.4.0" + "revision": "978901aed4025e36ebf60c040c9000c559d7c3e0", + "version": "3.4.3" } } ] diff --git a/Package.swift b/Package.swift index 8380c5d..1a9cc60 100644 --- a/Package.swift +++ b/Package.swift @@ -1,20 +1,32 @@ -// swift-tools-version:3.1 - +// swift-tools-version:4.0 import PackageDescription let package = Package( name: "Hexaville", - targets: [ - Target(name: "HexavilleCore"), - Target(name: "Hexaville", dependencies: ["HexavilleCore"]) + products: [ + .library(name: "HexavilleCore", targets: ["HexavilleCore"]), + .executable(name: "hexaville", targets: ["Hexaville"]) ], dependencies: [ - .Package(url: "https://github.com/swift-aws/s3.git", majorVersion: 0, minor: 3), - .Package(url: "https://github.com/swift-aws/lambda.git", majorVersion: 0, minor: 3), - .Package(url: "https://github.com/swift-aws/iam.git", majorVersion: 0, minor: 3), - .Package(url: "https://github.com/swift-aws/apigateway.git", majorVersion: 0, minor: 3), - .Package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", majorVersion: 16), - .Package(url: "https://github.com/jakeheis/SwiftCLI.git", majorVersion: 3, minor: 1), - .Package(url: "https://github.com/behrang/YamlSwift.git", majorVersion: 3) + .package(url: "https://github.com/swift-aws/s3.git", .upToNextMajor(from: "1.1.6")), + .package(url: "https://github.com/swift-aws/lambda.git", .upToNextMajor(from: "1.1.6")), + .package(url: "https://github.com/swift-aws/iam.git", .upToNextMajor(from: "1.1.6")), + .package(url: "https://github.com/swift-aws/apigateway.git", .upToNextMajor(from: "1.1.6")), + .package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", .upToNextMajor(from: "17.0.1")), + .package(url: "https://github.com/jakeheis/SwiftCLI.git", .upToNextMajor(from: "5.0.0")), + .package(url: "https://github.com/behrang/YamlSwift.git", .upToNextMajor(from: "3.4.3")) + ], + targets: [ + .target(name: "HexavilleCore", dependencies: [ + "SwiftAWSS3", + "SwiftAWSLambda", + "SwiftAWSIam", + "SwiftAWSApigateway", + "SwiftyJSON", + "SwiftCLI", + "Yaml", + ]), + .target(name: "Hexaville", dependencies: ["HexavilleCore"]), + .testTarget(name: "HexavilleTests", dependencies: ["HexavilleCore"]) ] ) diff --git a/Package@swift-4.swift b/Package@swift-4.swift deleted file mode 100644 index b652927..0000000 --- a/Package@swift-4.swift +++ /dev/null @@ -1,32 +0,0 @@ -// swift-tools-version:4.0 -import PackageDescription - -let package = Package( - name: "Hexaville", - products: [ - .library(name: "HexavilleCore", targets: ["HexavilleCore"]), - .executable(name: "hexaville", targets: ["Hexaville"]) - ], - dependencies: [ - .package(url: "https://github.com/swift-aws/s3.git", .upToNextMajor(from: "1.0.1")), - .package(url: "https://github.com/swift-aws/lambda.git", .upToNextMajor(from: "1.0.1")), - .package(url: "https://github.com/swift-aws/iam.git", .upToNextMajor(from: "1.0.1")), - .package(url: "https://github.com/swift-aws/apigateway.git", .upToNextMajor(from: "1.0.1")), - .package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", .upToNextMajor(from: "16.0.0")), - .package(url: "https://github.com/jakeheis/SwiftCLI.git", .upToNextMajor(from: "3.1.0")), - .package(url: "https://github.com/behrang/YamlSwift.git", .upToNextMajor(from: "3.0.0")) - ], - targets: [ - .target(name: "HexavilleCore", dependencies: [ - "SwiftAWSS3", - "SwiftAWSLambda", - "SwiftAWSIam", - "SwiftAWSApigateway", - "SwiftyJSON", - "SwiftCLI", - "Yaml", - ]), - .target(name: "Hexaville", dependencies: ["HexavilleCore"]), - .testTarget(name: "HexavilleTests", dependencies: ["HexavilleCore"]) - ] -) From 263cf10633f0d350ee863ee266640356bef2d8f6 Mon Sep 17 00:00:00 2001 From: noppoman Date: Wed, 15 Aug 2018 16:07:29 +0900 Subject: [PATCH 2/2] add apt-get update before install swift --- Scripts/install-swift.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/install-swift.sh b/Scripts/install-swift.sh index 3b63889..4550de6 100644 --- a/Scripts/install-swift.sh +++ b/Scripts/install-swift.sh @@ -24,6 +24,7 @@ fi if [[ $OS != "macos" ]]; then + sudo apt-get update sudo apt-get install -y clang libicu-dev uuid-dev if [[ $OS == "ubuntu1510" ]];