fix: allow overriding both DOKKU_VERSION and GIT_REV via environment variables

This commit is contained in:
Jose Diaz-Gonzalez
2017-01-08 16:41:05 -07:00
parent 4740ee1edc
commit 6ab9e04ba6
4 changed files with 26 additions and 2 deletions

View File

@@ -22,7 +22,11 @@ arch-setup:
arch-dokku: arch-setup
echo "-> Update package sums, create metadata file and test the build of the package"
ifeq ($(DOKKU_VERSION),master)
git describe --tags > /tmp/VERSION
else
echo $(DOKKU_VERSION) > /tmp/VERSION
endif
cat /tmp/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/STABLE_VERSION
sed -i -e "s/pkgver=.*/pkgver=`cat /tmp/STABLE_VERSION`/" /dokku-arch/PKGBUILD
cd /dokku-arch; updpkgsums; mksrcinfo; makepkg -fd