Only upload nightly if on master branch

This commit is contained in:
Daniel Nelson 2017-08-07 17:24:35 -07:00
parent a1e7a5f474
commit 5e73f3e816
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 6 additions and 1 deletions

View File

@ -87,6 +87,11 @@ elif [ -n "${PACKAGE}" ]; then
# install boto & rpm (packaging & AWS dependencies)
exit_if_fail sudo apt-get install -y rpm python-boto
unset GOGC
exit_if_fail ./scripts/build.py --nightly --package --platform=all --arch=all --upload --bucket=dl.influxdata.com/telegraf/nightlies
if [ "$(git rev-parse --abbrev-ref HEAD)" = master ]
then
exit_if_fail ./scripts/build.py --nightly --package --platform=all --arch=all --upload --bucket=dl.influxdata.com/telegraf/nightlies
else
exit_if_fail ./scripts/build.py --package --platform=all --arch=all
fi
mv build $CIRCLE_ARTIFACTS
fi