diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 3a7f8e675..d8c6bedf3 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -222,6 +222,24 @@ jobs: run: | git diff --exit-code + verify-cli-binary-archive: + runs-on: macos-13 + needs: [changes] + if: ${{ needs.changes.outputs.codegen == 'true' }} + timeout-minutes: 5 + name: Verify CLI Binary Archive - macOS + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Extract CLI Binary + shell: bash + working-directory: apollo-ios/CLI + run: tar -xf apollo-ios-cli.tar.gz apollo-ios-cli + - name: Verify Version + shell: bash + working-directory: apollo-ios/scripts + run: ./cli-version-check.sh + run-cocoapods-integration-tests: runs-on: macos-13 timeout-minutes: 20 diff --git a/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift b/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift index 93d8c3a45..807ca7e31 100644 --- a/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift +++ b/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift @@ -1,6 +1,6 @@ import Foundation public enum Constants { - public static let CLIVersion: String = "1.12.1" + public static let CLIVersion: String = "1.12.2" static let defaultFilePath: String = "./apollo-codegen-config.json" } diff --git a/apollo-ios/CHANGELOG.md b/apollo-ios/CHANGELOG.md index af1781b11..d8b683683 100644 --- a/apollo-ios/CHANGELOG.md +++ b/apollo-ios/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## v1.12.2 + +### Fixed +- **Rebuilt the CLI binary with the correct version number:** The CLI binary included in the `1.12.1` package was built with an incorrect version number causing a version mismatch when attempting to execute code generation. + ## v1.12.1 ### Fixed diff --git a/apollo-ios/CLI/apollo-ios-cli.tar.gz b/apollo-ios/CLI/apollo-ios-cli.tar.gz index 2723a60e3..6aac895db 100644 Binary files a/apollo-ios/CLI/apollo-ios-cli.tar.gz and b/apollo-ios/CLI/apollo-ios-cli.tar.gz differ diff --git a/apollo-ios/Sources/Apollo/Constants.swift b/apollo-ios/Sources/Apollo/Constants.swift index e1c26d9e2..6699ccd08 100644 --- a/apollo-ios/Sources/Apollo/Constants.swift +++ b/apollo-ios/Sources/Apollo/Constants.swift @@ -1,5 +1,5 @@ import Foundation public enum Constants { - public static let ApolloVersion: String = "1.12.1" + public static let ApolloVersion: String = "1.12.2" } diff --git a/apollo-ios/scripts/cli-version-check.sh b/apollo-ios/scripts/cli-version-check.sh new file mode 100755 index 000000000..6935cd0d0 --- /dev/null +++ b/apollo-ios/scripts/cli-version-check.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +directory=$(dirname "$0") +projectDir="$directory/../CLI" + +APOLLO_VERSION=$(sh "$directory/get-version.sh") +FILE_PATH="$projectDir/apollo-ios-cli.tar.gz" +tar -xf "$FILE_PATH" +CLI_VERSION=$(./apollo-ios-cli --version) + +echo "Comparing Apollo version $APOLLO_VERSION with CLI version $CLI_VERSION" + +if [ "$APOLLO_VERSION" = "$CLI_VERSION" ]; then + echo "Success - matched!" +else + echo "Failed - mismatch!" + exit 1 +fi