Circle script: create packages if commit is tagged

This commit is contained in:
Cameron Sparr 2016-02-20 11:52:43 -07:00 committed by Michele Fadda
parent 00bd78fde6
commit 0b882cc2f9
2 changed files with 10 additions and 1 deletions

View File

@ -12,6 +12,9 @@ machine:
dependencies:
override:
- docker info
post:
- gem install fpm
- sudo apt-get install -y rpm python-boto
test:
override:

View File

@ -70,4 +70,10 @@ exit_if_fail telegraf -config $tmpdir/config.toml \
mv $GOPATH/bin/telegraf $CIRCLE_ARTIFACTS
exit $rc
eval "git describe --exact-match HEAD"
if [ $? -eq 0 ]; then
tag=$(git describe --exact-match HEAD)
echo $tag
exit_if_fail ./scripts/build.py --package --version=$tag --platform=linux --arch=all --upload
mv build $CIRCLE_ARTIFACTS
fi