diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..5ea12896 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# .dockerignore +.build diff --git a/.swift-version b/.swift-version index bf77d549..ac14c3df 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.1.1 diff --git a/.travis.yml b/.travis.yml index 36cd8110..452dc93e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ language: generic matrix: include: - os: osx - osx_image: xcode10 + osx_image: xcode11.2 install: - node -v - npm install -g danger@7.1.4 @@ -19,26 +19,6 @@ matrix: - swift test - danger-swift ci - - os: osx - name: Swift 5.0 - osx_image: xcode10.2 - install: - - node -v - - npm install -g danger@7.1.4 - - make install - script: - - swift test - - danger-swift ci - - - os: osx - osx_image: xcode10 - install: - - echo "Installing and testing via homebrew" - - brew tap danger/tap - - brew install danger-swift - script: - - danger-swift pr https://github.com/danger/swift/pull/153 - - os: linux language: generic sudo: required @@ -47,7 +27,7 @@ matrix: - node -v - npm install -g danger@7.1.4 - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" - - swiftenv global 4.2 + - swiftenv global 5.1.1 script: - swift test - sudo chmod -R a+rwx /usr/local/ @@ -56,7 +36,7 @@ matrix: - os: osx name: Danger with SPM - osx_image: xcode10 + osx_image: xcode11.2 install: - node -v - npm install -g danger@7.1.4 @@ -72,6 +52,6 @@ matrix: - node -v - npm install -g danger@7.1.4 - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" - - swiftenv global 4.2 + - swiftenv global 5.1.1 script: - swift run danger-swift ci diff --git a/CHANGELOG.md b/CHANGELOG.md index 717a764f..871ba3cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ ## Master +- Move to swift 5.1 [@f-meloni][] - [#275](htts://github.com/danger/swift/pull/275) + ## 2.0.7 - Use enums as namespace [@f-meloni][] - [#296](htts://github.com/danger/swift/pull/296) diff --git a/Dockerfile b/Dockerfile index 51a58e56..bcfd8791 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM swift:4.2 +FROM swift:5.1 MAINTAINER Orta Therox @@ -8,11 +8,15 @@ LABEL "com.github.actions.icon"="zap" LABEL "com.github.actions.color"="blue" # Install nodejs -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - -RUN apt-get install -y nodejs +RUN apt-get update -q \ + && apt-get install -qy curl \ + && mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/dist-packages; ln -s dist-packages /usr/lib/python2.7/site-package \ + && curl -sL https://deb.nodesource.com/setup_10.x | bash - \ + && apt-get install -qy nodejs \ + && rm -r /var/lib/apt/lists/* # Install danger-swift globally -RUN git clone https://github.com/danger/danger-swift.git --single-branch --depth 1 --branch 2.0.7 _danger-swift +COPY . _danger-swift RUN cd _danger-swift && make install # Run Danger Swift via Danger JS, allowing for custom args diff --git a/Makefile b/Makefile index b1f2ed47..d81b2287 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ INSTALL_PATH = $(PREFIX)/bin/$(TOOL_NAME) BUILD_PATH = .build/release/$(TOOL_NAME) LIB_INSTALL_PATH = $(PREFIX)/lib/danger -SWIFT_LIB_FILES = .build/release/libDanger.* .build/release/Danger.swiftdoc .build/release/Danger.swiftmodule .build/release/ShellOut.swiftmodule .build/release/ShellOut.swiftdoc .build/release/OctoKit.swiftdoc .build/release/OctoKit.swiftmodule .build/release/RequestKit.swiftdoc .build/release/RequestKit.swiftmodule .build/release/Logger.swiftdoc .build/release/Logger.swiftmodule .build/release/DangerShellExecutor.swiftmodule .build/release/DangerShellExecutor.swiftmodule +SWIFT_LIB_FILES = .build/release/libDanger.* .build/release/Danger.swiftdoc .build/release/Danger.swiftmodule .build/release/ShellOut.swiftmodule .build/release/ShellOut.swiftdoc .build/release/OctoKit.swiftdoc .build/release/OctoKit.swiftmodule .build/release/RequestKit.swiftdoc .build/release/RequestKit.swiftmodule .build/release/Logger.swiftdoc .build/release/Logger.swiftmodule .build/release/DangerShellExecutor.swiftdoc .build/release/DangerShellExecutor.swiftmodule docs: swift run sourcedocs generate --spm-module Danger --output-folder Documentation/reference @@ -29,7 +29,7 @@ install: build build: swift package clean - swift build --disable-sandbox -c release --static-swift-stdlib + swift build --disable-sandbox -c release uninstall: rm -f $(INSTALL_PATH) diff --git a/Package.resolved b/Package.resolved index 3d4e4439..a4128426 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,22 +1,13 @@ { "object": { "pins": [ - { - "package": "AEXML", - "repositoryURL": "https://github.com/tadija/AEXML", - "state": { - "branch": null, - "revision": "54bb8ea6fb693dd3f92a89e5fcc19e199fdeedd0", - "version": "4.3.3" - } - }, { "package": "Commandant", "repositoryURL": "https://github.com/Carthage/Commandant.git", "state": { "branch": null, - "revision": "2cd0210f897fe46c6ce42f52ccfa72b3bbb621a0", - "version": "0.16.0" + "revision": "ab68611013dec67413628ac87c1f29e8427bc8e4", + "version": "0.17.0" } }, { @@ -29,21 +20,30 @@ } }, { - "package": "Files", - "repositoryURL": "https://github.com/JohnSundell/Files.git", + "package": "CwlCatchException", + "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", "state": { "branch": null, - "revision": "a84615f4558151fab52ac38df697ce2442991f93", - "version": "2.3.0" + "revision": "7cd2f8cacc4d22f21bc0b2309c3b18acf7957b66", + "version": "1.2.0" } }, { - "package": "JSONUtilities", - "repositoryURL": "https://github.com/yonaskolb/JSONUtilities.git", + "package": "CwlPreconditionTesting", + "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", + "state": { + "branch": null, + "revision": "c228db5d2ad1b01ebc84435e823e6cca4e3db98b", + "version": "1.2.0" + } + }, + { + "package": "Files", + "repositoryURL": "https://github.com/JohnSundell/Files.git", "state": { "branch": null, - "revision": "128d2ffc22467f69569ef8ff971683e2393191a0", - "version": "4.2.0" + "revision": "a84615f4558151fab52ac38df697ce2442991f93", + "version": "2.3.0" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/shibapm/Logger", "state": { "branch": null, - "revision": "c1cb5a142b99687ecc55d8de101bf082889f5fd1", - "version": "0.2.2" + "revision": "53c3ecca5abe8cf46697e33901ee774236d94cce", + "version": "0.2.3" } }, { @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/Quick/Nimble.git", "state": { "branch": null, - "revision": "43304bf2b1579fd555f2fdd51742771c1e4f2b98", - "version": "8.0.1" + "revision": "6abeb3f5c03beba2b9e4dbe20886e773b5b629b6", + "version": "8.0.4" } }, { @@ -96,26 +96,8 @@ "repositoryURL": "https://github.com/nerdishbynature/octokit.swift", "state": { "branch": null, - "revision": "b63f2ec1b55f26c8e94159d81ad695aeb92f3d4e", - "version": "0.9.0" - } - }, - { - "package": "PackageConfig", - "repositoryURL": "https://github.com/shibapm/PackageConfig", - "state": { - "branch": null, - "revision": "fd0829aac9851434b3d2db0890e27bc489fc973a", - "version": "0.12.2" - } - }, - { - "package": "PathKit", - "repositoryURL": "https://github.com/kylef/PathKit.git", - "state": { - "branch": null, - "revision": "e2f5be30e4c8f531c9c1e8765aa7b71c0a45d7a0", - "version": "0.9.2" + "revision": "9ad4d6eff94ad1d9873d3b410a47c663c820d4bd", + "version": "0.10.0" } }, { @@ -123,13 +105,13 @@ "repositoryURL": "https://github.com/Quick/Quick.git", "state": { "branch": null, - "revision": "94df9b449508344667e5afc7e80f8bcbff1e4c37", - "version": "2.1.0" + "revision": "33682c2f6230c60614861dfc61df267e11a1602f", + "version": "2.2.0" } }, { "package": "Rainbow", - "repositoryURL": "https://github.com/onevcat/Rainbow.git", + "repositoryURL": "https://github.com/onevcat/Rainbow", "state": { "branch": null, "revision": "9c52c1952e9b2305d4507cf473392ac2d7c9b155", @@ -150,8 +132,8 @@ "repositoryURL": "https://github.com/nerdishbynature/RequestKit.git", "state": { "branch": null, - "revision": "defcc7cb005995f261b47e357874a539f3b5c679", - "version": "2.3.0" + "revision": "fd5e9e99aada7432170366c9e95967011ce13bad", + "version": "2.4.0" } }, { @@ -163,15 +145,6 @@ "version": "2.0.1" } }, - { - "package": "Result", - "repositoryURL": "https://github.com/antitypical/Result.git", - "state": { - "branch": null, - "revision": "2ca499ba456795616fbc471561ff1d963e6ae160", - "version": "4.1.0" - } - }, { "package": "Rocket", "repositoryURL": "https://github.com/shibapm/Rocket", @@ -186,8 +159,8 @@ "repositoryURL": "https://github.com/JohnSundell/ShellOut.git", "state": { "branch": null, - "revision": "d3d54ce662dfee7fef619330b71d251b8d4869f9", - "version": "2.2.0" + "revision": "4ebf25863deb9c3c02696704fc3d39736183f258", + "version": "2.2.1" } }, { @@ -208,31 +181,13 @@ "version": "0.22.0" } }, - { - "package": "Spectre", - "repositoryURL": "https://github.com/kylef/Spectre.git", - "state": { - "branch": null, - "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", - "version": "0.9.0" - } - }, { "package": "SnapshotTesting", "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git", "state": { - "branch": null, - "revision": "1fb2e65cf62d2f983b3cab2871cbb218ea9ee9b7", - "version": "1.3.0" - } - }, - { - "package": "SwiftCLI", - "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", - "state": { - "branch": null, - "revision": "5318c37d3cacc8780f50b87a8840a6774320ebdf", - "version": "5.2.2" + "branch": "master", + "revision": "12c6a7ce9d67f39a23c6bab757bdb073bd997885", + "version": null } }, { @@ -240,8 +195,8 @@ "repositoryURL": "https://github.com/nicklockwood/SwiftFormat", "state": { "branch": null, - "revision": "8b3e855384f15847915fa3a02019185ee7515107", - "version": "0.40.8" + "revision": "b564570c139d1c36292e8a5bb08d4ba6818b0a91", + "version": "0.43.0" } }, { @@ -280,24 +235,6 @@ "version": "4.9.0" } }, - { - "package": "XcodeGen", - "repositoryURL": "https://github.com/yonaskolb/XcodeGen.git", - "state": { - "branch": null, - "revision": "95bc051d268f6b8b924ae9c84e40566efe90cb80", - "version": "2.3.0" - } - }, - { - "package": "xcodeproj", - "repositoryURL": "https://github.com/tuist/xcodeproj.git", - "state": { - "branch": null, - "revision": "8e15cc74149ee946b7ae125685177915b4ff7317", - "version": "6.4.0" - } - }, { "package": "Yams", "repositoryURL": "https://github.com/jpsim/Yams.git", diff --git a/Package.swift b/Package.swift index d2306bc4..828b8a4d 100644 --- a/Package.swift +++ b/Package.swift @@ -15,13 +15,13 @@ let package = Package( dependencies: [ .package(url: "https://github.com/shibapm/Logger", from: "0.1.0"), .package(url: "https://github.com/JohnSundell/Marathon", from: "3.3.0"), - .package(url: "https://github.com/nerdishbynature/octokit.swift", from: "0.9.0"), + .package(url: "https://github.com/nerdishbynature/octokit.swift", from: "0.10.0"), // Danger Plugins // Dev dependencies .package(url: "https://github.com/shibapm/Komondor", from: "1.0.0"), // dev .package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.35.8"), // dev .package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1"), // dev - .package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.0.0"), // dev + .package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", .branch("master")), // dev .package(url: "https://github.com/shibapm/Rocket", from: "0.4.0"), // dev .package(url: "https://github.com/jpsim/Yams.git", from: "1.0.0"), // dev .package(url: "https://github.com/eneko/SourceDocs", from: "0.5.1"), // dev