Skip to content

Commit f9a411b

Browse files
authored
Fix conditional post-build actions (aws-samples#44)
A few things didn't work: 1. Each action needs to be conditional, since codebuild will continue even if the first action failed. 2. This error happened: /codebuild/output/tmp/script.sh: [[: not found
1 parent 3cc4a16 commit f9a411b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

buildspec.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ phases:
1212
- /bin/bash ./build.sh
1313
post_build:
1414
commands:
15-
- if [[ ! -f ".BUILD_COMPLETED" ]]; then exit 1; fi
16-
- /bin/bash ./pack.sh
17-
- /bin/bash ./bundle-beta.sh
15+
- "[ -f .BUILD_COMPLETED ] && /bin/bash ./pack.sh"
16+
- "[ -f .BUILD_COMPLETED ] && /bin/bash ./bundle-beta.sh"
1817
artifacts:
1918
files:
2019
- "**/*"

0 commit comments

Comments
 (0)