Skip to content

Commit

Permalink
Fix conditional post-build actions (aws#44)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eladb authored Jun 5, 2018
1 parent 3cc4a16 commit f9a411b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ phases:
- /bin/bash ./build.sh
post_build:
commands:
- if [[ ! -f ".BUILD_COMPLETED" ]]; then exit 1; fi
- /bin/bash ./pack.sh
- /bin/bash ./bundle-beta.sh
- "[ -f .BUILD_COMPLETED ] && /bin/bash ./pack.sh"
- "[ -f .BUILD_COMPLETED ] && /bin/bash ./bundle-beta.sh"
artifacts:
files:
- "**/*"
Expand Down

0 comments on commit f9a411b

Please sign in to comment.