Circle script: create packages if commit is tagged

This commit is contained in:
Cameron Sparr 2016-02-20 11:52:43 -07:00
parent 9edc25999e
commit c9d0ae7cf3
2 changed files with 10 additions and 1 deletions

View File

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

View File

@ -70,4 +70,10 @@ exit_if_fail telegraf -config $tmpdir/config.toml \
mv $GOPATH/bin/telegraf $CIRCLE_ARTIFACTS 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