Skip to content

Commit

Permalink
fix: add check for codebuild when updating url (#12924)
Browse files Browse the repository at this point in the history
* fix: add check for codebuild when updating url

* fix: add check for codebuild when updating url
  • Loading branch information
goldbez committed Jul 10, 2023
1 parent 7a59719 commit d399855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/amplify-cli-npm/binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ const getCompressedBinaryUrl = (): string => {
const compressedBinaryName = getPlatformCompressedBinaryName();
let url = `${BINARY_LOCATION}/${version}/${compressedBinaryName}`;

if (process.env.IS_AMPLIFY_CI) {
if (process.env.IS_AMPLIFY_CI && process.env.CODEBUILD_SRC_DIR) {
// use cloudfront distribution for e2e
url = `https://${process.env.PKG_CLI_CLOUDFRONT_URL}/${version}/${compressedBinaryName}`;
} else if (process.env.IS_AMPLIFY_CI) {
url = url.replace('.tgz', `-${getCommitHash()}.tgz`);
}

Expand Down

0 comments on commit d399855

Please sign in to comment.