Write version to VERSION file on deploy

This commit is contained in:
Nabeel Shahzad 2017-12-15 18:55:20 -06:00
parent 451e9ee8f7
commit 7473b179c0
2 changed files with 6 additions and 5 deletions

View File

@ -11,16 +11,19 @@ if [ "$TRAVIS" = "true" ]; then
TAR_NAME="phpvms-7.0.0-$PKG_NAME.tar.gz"
echo "Writing $TAR_NAME"
# delete all superfluous files
echo "cleaning files"
cd $TRAVIS_BUILD_DIR
find ./vendor -type d -name ".git" | xargs rm -rf
rm -rf .idea phpvms.iml .travis .dpl
rm -rf .phpstorm.meta.php _ide_helper.php
php artisan version:show > VERSION
mv .env.dev.example .env
echo "creating tarball"
tar -czf /tmp/$TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms phpvms/.*
cd /tmp
tar -czf $TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms phpvms/.*
echo "running rsync"
rsync -ahP --delete-after /tmp/$TAR_NAME downloads@phpvms.net:/var/www/downloads/

View File

@ -7,13 +7,11 @@ current:
cache:
enabled: true
key: pragmarx-version
time: 525600 #minutes = 1 year
time: 60 # minutes = 1 year
build:
#mode: number # "number", "git-local" or "git-remote"
mode: git-local # "number", "git-local" or "git-remote"
number: 701031
length: 6
increment_by: 1
git:
#git-local: "git rev-parse --verify HEAD"
git-local: "git rev-parse --quiet --verify HEAD 2>/dev/null || echo VERSION"