diff --git a/Sources/ApolloCodegenLib/CLIDownloader.swift b/Sources/ApolloCodegenLib/CLIDownloader.swift index 3c22674ab9..077c7e15c9 100644 --- a/Sources/ApolloCodegenLib/CLIDownloader.swift +++ b/Sources/ApolloCodegenLib/CLIDownloader.swift @@ -30,7 +30,7 @@ struct CLIDownloader { } /// The URL string for getting the current version of the CLI - static let downloadURLString = "https://46555-65563448-gh.circle-artifacts.com/0/oclif-pack/apollo-v2.26.0/apollo-v2.26.0-darwin-x64.tar.gz" + static let downloadURLString = "https://install.apollographql.com/legacy-cli/darwin/2.27.2" /// Downloads the appropriate Apollo CLI in a zip file. /// diff --git a/Sources/ApolloCodegenLib/CLIExtractor.swift b/Sources/ApolloCodegenLib/CLIExtractor.swift index 9769e01dc0..36e1a39213 100644 --- a/Sources/ApolloCodegenLib/CLIExtractor.swift +++ b/Sources/ApolloCodegenLib/CLIExtractor.swift @@ -25,7 +25,7 @@ struct CLIExtractor { } } - static let expectedSHASUM = "efc67e140096bb3414a385c5da32dfa0d9a6172ac081f0351998c62b5d3db502" + static let expectedSHASUM = "08c45258b7cc1d4e6e28288930428922fd7dee9ccaad6e5be17dd5b79e6b1af4" /// Checks to see if the CLI has already been extracted and is the correct version, and extracts or re-extracts as necessary /// @@ -118,7 +118,8 @@ struct CLIExtractor { /// - Parameter zipFileURL: The url to the zip file containing the Apollo CLI. /// - Parameter expected: The expected SHASUM. Defaults to the real expected SHASUM. This parameter exists mostly for testing. static func validateZipFileSHASUM(at zipFileURL: URL, expected: String = CLIExtractor.expectedSHASUM) throws { - let shasum = try FileManager.default.apollo_shasum(at: zipFileURL) + let shasum = try FileManager.default.apollo_shasum(at: zipFileURL) + print("SHASUM: \(shasum)") guard shasum == expected else { throw CLIExtractorError.zipFileHasInvalidSHASUM(expectedSHASUM: expected, gotSHASUM: shasum) } diff --git a/scripts/run-bundled-codegen.sh b/scripts/run-bundled-codegen.sh index d10a017b52..c46dec7897 100755 --- a/scripts/run-bundled-codegen.sh +++ b/scripts/run-bundled-codegen.sh @@ -11,7 +11,7 @@ SCRIPT_DIR="$(dirname "$0")" # Get the SHASUM of the tarball ZIP_FILE="${SCRIPT_DIR}/apollo.tar.gz" -ZIP_FILE_DOWNLOAD_URL="https://46555-65563448-gh.circle-artifacts.com/0/oclif-pack/apollo-v2.26.0/apollo-v2.26.0-darwin-x64.tar.gz" +ZIP_FILE_DOWNLOAD_URL="https://install.apollographql.com/legacy-cli/darwin/2.27.2" SHASUM_FILE="${SCRIPT_DIR}/apollo/.shasum" APOLLO_DIR="${SCRIPT_DIR}"/apollo IS_RETRY="false" @@ -58,7 +58,7 @@ extract_cli() { validate_codegen_and_extract_if_needed() { # Make sure the SHASUM matches the release for this version - EXPECTED_SHASUM="efc67e140096bb3414a385c5da32dfa0d9a6172ac081f0351998c62b5d3db502" + EXPECTED_SHASUM="08c45258b7cc1d4e6e28288930428922fd7dee9ccaad6e5be17dd5b79e6b1af4" update_shasum if [[ ${SHASUM} = ${EXPECTED_SHASUM}* ]]; then