Cleanup of deploy script
This commit is contained in:
parent
666c5d50d4
commit
299f391455
@ -38,7 +38,6 @@ if [ "$TRAVIS" = "true" ]; then
|
|||||||
bpocallaghan/generators \
|
bpocallaghan/generators \
|
||||||
barryvdh/laravel-ide-helper
|
barryvdh/laravel-ide-helper
|
||||||
|
|
||||||
rm -rf env.php config.php
|
|
||||||
find ./vendor -type d -name ".git" -print0 | xargs rm -rf
|
find ./vendor -type d -name ".git" -print0 | xargs rm -rf
|
||||||
find . -type d -name "sass-cache" -print0 | xargs rm -rf
|
find . -type d -name "sass-cache" -print0 | xargs rm -rf
|
||||||
|
|
||||||
@ -46,28 +45,39 @@ if [ "$TRAVIS" = "true" ]; then
|
|||||||
find storage/app/public -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
find storage/app/public -mindepth 1 -not -name '.gitignore' -print0 -exec rm -rf {} +
|
||||||
find storage/app -mindepth 1 -not -name '.gitignore' -not -name public -not -name import -print0 -exec rm -rf {} +
|
find storage/app -mindepth 1 -not -name '.gitignore' -not -name public -not -name import -print0 -exec rm -rf {} +
|
||||||
|
|
||||||
# Remove any development files
|
# Leftover individual files to delete
|
||||||
rm -rf .sass-cache
|
declare -a remove_files=(
|
||||||
rm -rf .idea phpvms.iml .travis .dpl
|
.git
|
||||||
rm -rf .phpstorm.meta.php _ide_helper.php phpunit.xml Procfile
|
.sass-cache
|
||||||
rm -f phpstan.neon
|
.idea
|
||||||
|
.travis
|
||||||
|
.dpl
|
||||||
|
.phpstorm.meta.php
|
||||||
|
_ide_helper.php
|
||||||
|
env.php
|
||||||
|
config.php
|
||||||
|
phpunit.xml
|
||||||
|
phpvms.iml
|
||||||
|
Procfile
|
||||||
|
phpstan.neon
|
||||||
|
node_modules
|
||||||
|
composer.phar
|
||||||
|
vendor/willdurand/geocoder/tests
|
||||||
|
)
|
||||||
|
|
||||||
# remove large sized files
|
for file in "${remove_files[@]}"
|
||||||
rm -rf .git
|
do
|
||||||
rm -rf node_modules
|
rm -rf $file
|
||||||
rm -rf composer.phar
|
done
|
||||||
|
|
||||||
# delete files in vendor that are rather large
|
|
||||||
rm -rf vendor/willdurand/geocoder/tests
|
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
echo "creating tarball"
|
echo "Creating Tarball"
|
||||||
cd /tmp
|
cd /tmp
|
||||||
tar -czf $TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms
|
tar -czf $TAR_NAME -C $TRAVIS_BUILD_DIR/../ phpvms
|
||||||
sha256sum $TAR_NAME > "$TAR_NAME.sha256"
|
sha256sum $TAR_NAME > "$TAR_NAME.sha256"
|
||||||
|
|
||||||
echo "uploading to s3"
|
echo "Uploading to S3"
|
||||||
mkdir -p $TRAVIS_BUILD_DIR/build
|
mkdir -p $TRAVIS_BUILD_DIR/build
|
||||||
cd $TRAVIS_BUILD_DIR/build
|
cd $TRAVIS_BUILD_DIR/build
|
||||||
|
|
||||||
@ -77,11 +87,11 @@ if [ "$TRAVIS" = "true" ]; then
|
|||||||
# Upload the version for a tagged release. Move to a version file in different
|
# Upload the version for a tagged release. Move to a version file in different
|
||||||
# tags. Within phpVMS, we have an option of which version to track in the admin
|
# tags. Within phpVMS, we have an option of which version to track in the admin
|
||||||
if test "$TRAVIS_TAG"; then
|
if test "$TRAVIS_TAG"; then
|
||||||
echo "uploading release version file"
|
echo "Uploading release version file"
|
||||||
cp "$TRAVIS_BUILD_DIR/VERSION" release_version
|
cp "$TRAVIS_BUILD_DIR/VERSION" release_version
|
||||||
artifacts upload --target-paths "/" release_version
|
artifacts upload --target-paths "/" release_version
|
||||||
else
|
else
|
||||||
echo "uploading ${TRAVIS_BRANCH}_version file"
|
echo "Uploading ${TRAVIS_BRANCH}_version file"
|
||||||
cp $TRAVIS_BUILD_DIR/VERSION ${TRAVIS_BRANCH}_version
|
cp $TRAVIS_BUILD_DIR/VERSION ${TRAVIS_BRANCH}_version
|
||||||
artifacts upload --target-paths "/" ${TRAVIS_BRANCH}_version
|
artifacts upload --target-paths "/" ${TRAVIS_BRANCH}_version
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user