The BRANCH value will vary depending if the build is done as part of a
pull request or not. If it is, it will contain the name of the target
branch, which will be development, and will trigger a deploy...
Look also at HEAD_BRANCH which contains the name of the source branch
on pull requests
Also moved the logic into a script, because Shippable doesn't support
testing values within the YAML file very well: If the test exists with a
non-zero code this is considered an error, and attempting to chain it
with || exit 0 doesn't work and fail the build too
Ok, this time hopefully it's good. Shippable sucks :cry: we should try to make progress on open sourcing the code so that we can use better tools like Travis CI.
The
BRANCH
value will vary depending if the build is done as part of a pull request or not. If it is, it will contain the name of the target branch, which will bedevelopment
, and will trigger a deploy...Look also at
HEAD_BRANCH
which contains the name of the source branch on pull requestsAlso moved the logic into a script, because Shippable doesn't support testing values within the YAML file very well: If the test exists with a non-zero code this is considered an error, and attempting to chain it with
|| exit 0
doesn't work and fail the build too