From c9d0ae7cf3c90d853b4b6a750430f1484037a71a Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Sat, 20 Feb 2016 11:52:43 -0700 Subject: [PATCH] Circle script: create packages if commit is tagged --- circle.yml | 3 +++ scripts/circle-test.sh | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index d86d46dba..67c29ef4a 100644 --- a/circle.yml +++ b/circle.yml @@ -12,6 +12,9 @@ machine: dependencies: override: - docker info + post: + - gem install fpm + - sudo apt-get install -y rpm python-boto test: override: diff --git a/scripts/circle-test.sh b/scripts/circle-test.sh index 72f297f9f..ab0956518 100755 --- a/scripts/circle-test.sh +++ b/scripts/circle-test.sh @@ -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