From d44333c2dd61cf490d7c6fce89d378ea5e2d8f38 Mon Sep 17 00:00:00 2001 From: Marko Justinek <1733327+surpher@users.noreply.github.com> Date: Mon, 13 May 2024 23:18:28 +1000 Subject: [PATCH] release: v1.2.0 --- .github/workflows/build.yml | 13 +++++++------ Package.resolved | 13 +++++++++++-- Package.swift | 7 ++++--- Plugins/DownloaderPlugin/DownloaderPlugin.swift | 3 ++- Plugins/LibsLocationPlugin/LibsLocationPlugin.swift | 4 ++++ 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b74394bc..41bcbc96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,28 +15,29 @@ on: - 'style/**' - 'test/**' - 'tech/**' - - 'for-posterity/**' + - 'legacy/**' env: RUST_TARGET_PATH: pact-reference jobs: + test: name: Run ${{ matrix.platform }} on ${{ matrix.host }} runs-on: ${{ matrix.host }} strategy: - fail-fast: true + fail-fast: false matrix: host: [macos-13, macos-14] platform: [ios, macos] include: - platform: ios scheme: "PactSwift-iOS" - destination: "platform=iOS Simulator,name=iPhone 15 Pro" + destination: "platform=iOS Simulator,name=iPhone 14 Pro" - platform: macos scheme: "PactSwift-macOS" - destination: "arch=arm64" + destination: "arch=x86_64" - host: macos-13 xcode: 14.3.1 - host: macos-14 @@ -52,7 +53,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use Xcode ${{ matrix.xcode }} run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app @@ -87,7 +88,7 @@ jobs: run: swift --version - name: "⬇️ Checkout repository" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Protoc uses: arduino/setup-protoc@v1 diff --git a/Package.resolved b/Package.resolved index 51ae792f..1811e568 100644 --- a/Package.resolved +++ b/Package.resolved @@ -14,8 +14,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/surpher/PactSwiftMockServer.git", "state" : { - "revision" : "c2f02dfba35618dc81f2863267a3a0cbec0fe9a8", - "version" : "0.4.3" + "revision" : "52df1915c4a1e702484bbdd9f41eb4fb915ba17f", + "version" : "0.5.0" + } + }, + { + "identity" : "pactswiftserver", + "kind" : "remoteSourceControl", + "location" : "https://github.com/surpher/PactSwiftServer.git", + "state" : { + "revision" : "12ecc92092ecd3640dcc2dcb98ce6b3d1f2d76f7", + "version" : "0.4.7" } }, { diff --git a/Package.swift b/Package.swift index 0315e467..4deac9bb 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ let package = Package( name: "PactSwift", platforms: [ - .macOS(.v10_12), + .macOS(.v10_15), .iOS(.v12), .tvOS(.v12) ], @@ -32,7 +32,8 @@ let package = Package( ], dependencies: [ - .package(url: "https://github.com/surpher/PactSwiftMockServer.git", exact: "0.4.3"), + .package(url: "https://github.com/surpher/PactSwiftServer.git", exact: "0.4.7"), + .package(url: "https://github.com/surpher/PactSwiftMockServer.git", exact: "0.5.0"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.3.1"), .package(url: "https://github.com/apple/swift-crypto.git", from: "3.0.0"), ], @@ -43,7 +44,7 @@ let package = Package( .target( name: "PactSwift", dependencies: [ - .product(name: "PactSwiftMockServer", package: "PactSwiftMockServer", condition: .when(platforms: [.iOS, .macOS, .tvOS])), + .product(name: "PactSwiftMockServer", package: "PactSwiftServer", condition: .when(platforms: [.iOS, .macOS, .tvOS])), .product(name: "PactSwiftMockServerLinux", package: "PactSwiftMockServer", condition: .when(platforms: [.linux])) ], path: "./Sources" diff --git a/Plugins/DownloaderPlugin/DownloaderPlugin.swift b/Plugins/DownloaderPlugin/DownloaderPlugin.swift index 3ed9a7e5..28ed5407 100644 --- a/Plugins/DownloaderPlugin/DownloaderPlugin.swift +++ b/Plugins/DownloaderPlugin/DownloaderPlugin.swift @@ -72,6 +72,7 @@ private extension DownloaderPlugin { @discardableResult func unarchiveGzipArchiveAndRename(resource: URL, to newName: String) throws -> String { var destinationPath = resource.path + let lastPathComponent = (destinationPath as NSString).lastPathComponent print("info: Decompressing '\(destinationPath)'...") try shell(launchPath: launchPath, arguments: ["gzip", "-dvf", "\(destinationPath)"]) @@ -81,7 +82,7 @@ private extension DownloaderPlugin { // Rename resource let renameResult = try shell( launchPath: launchPath, - arguments: [ "mv", "-v", "\(destinationPath)", destinationPath.replacingOccurrences(of: destinationPath.lastPathComponent, with: newName) ] + arguments: [ "mv", "-v", "\(destinationPath)", destinationPath.replacingOccurrences(of: lastPathComponent, with: newName) ] ) return renameResult diff --git a/Plugins/LibsLocationPlugin/LibsLocationPlugin.swift b/Plugins/LibsLocationPlugin/LibsLocationPlugin.swift index 89471267..3a4cf155 100644 --- a/Plugins/LibsLocationPlugin/LibsLocationPlugin.swift +++ b/Plugins/LibsLocationPlugin/LibsLocationPlugin.swift @@ -10,6 +10,10 @@ struct DownloaderPlugin: CommandPlugin { private let localLibsDirName = "lib" // IMPORTANT: If you change this value, you must also change it in DownloaderPlugin.swift + private enum ColourCode: String { + case yellow = "\u{001B}[0;33m" + case `none` = "\u{001B}[0m" + } func performCommand(context: PluginContext, arguments: [String]) async throws { #if os(Linux)