Skip to content

Commit 6da471b

Browse files
authored
chore: fix short-circuit of post_build step (#18374)
The buildspec was recently altered (in #18365) to skip the `POST_BUILD`/pack step if the build failed; however, the command used was bash-specific and not compliant with CodeBuild. Rewrite the check to be sh-compliant. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent b3ec4fe commit 6da471b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buildspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ phases:
2828
post_build:
2929
commands:
3030
# Short-circuit: Don't run pack if the above build failed.
31-
- '[[ "$CODEBUILD_BUILD_SUCCEEDING" -eq 1 ]] || exit 1'
31+
- '[ ${CODEBUILD_BUILD_SUCCEEDING:-0} -eq 1 ] || exit 1'
3232
- "[ -f .BUILD_COMPLETED ] && /bin/bash ./pack.sh"
3333
- /bin/bash ./scripts/cache-store.sh
3434
artifacts:

0 commit comments

Comments
 (0)