diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f2ad009..bc4b5cd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ jobs: name: Create artifact upload directory and set variables command: | mkdir /tmp/upload - echo 'export CIBUILD=0.1.$(git rev-list HEAD --count | xargs printf "%04d")' >> $BASH_ENV + echo 'export CIBUILD=$(cat VERSION).$(git rev-list HEAD --count | xargs printf "%04d")' >> $BASH_ENV echo 'export CIBRANCH=$(git name-rev --name-only HEAD)' >> $BASH_ENV echo '[ "$CIBRANCH" != "master" ] && export CIVERSION=$CIBRANCH-$CIBUILD || export CIVERSION=$CIBUILD' >> $BASH_ENV diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..49d59571 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1 diff --git a/contrib/deb/generate.sh b/contrib/deb/generate.sh index e2c98208..6e58e875 100644 --- a/contrib/deb/generate.sh +++ b/contrib/deb/generate.sh @@ -14,7 +14,7 @@ PKGBRANCH=$(basename `git name-rev --name-only HEAD`) if [ "$PKGBRANCH" = "master" ]; then PKGNAME=yggdrasil else PKGNAME=yggdrasil-${PKGBRANCH}; fi PKGARCH=${PKGARCH-amd64} -PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d") +PKGVERSION=$(cat VERSION).$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d") PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build