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/