Read the version base from the install for the deployment

This commit is contained in:
Nabeel Shahzad
2018-02-03 13:16:37 -06:00
parent 43ecc35fe9
commit 512d8a2172
3 changed files with 29 additions and 19 deletions

View File

@@ -2,26 +2,28 @@
if [ "$TRAVIS" = "true" ]; then
cd $TRAVIS_BUILD_DIR
if test "$TRAVIS_TAG"; then
PKG_NAME=$TRAVIS_TAG
else
PKG_NAME=v7.0.0-$TRAVIS_BRANCH
BASE_VERSION=`php artisan phpvms:version --base-only`
PKG_NAME=$BASE_VERSION-$TRAVIS_BRANCH
fi
FILE_NAME="phpvms-$PKG_NAME"
TAR_NAME="$FILE_NAME.tar.gz"
echo "Writing $TAR_NAME"
cd $TRAVIS_BUILD_DIR
php artisan phpvms:version --write > VERSION
VERSION=`cat VERSION`
echo "Version: $VERSION"
echo "Cleaning files"
make clean
rm -rf env.php
rm -rf env.php config.php
find ./vendor -type d -name ".git" -print0 | xargs rm -rf
find . -type d -name "sass-cache" -print0 | xargs rm -rf