Created build script

This commit is contained in:
Alejandro Celaya 2016-08-15 09:45:09 +02:00
parent 804d99ebf7
commit 9e4fb68265

33
build.sh Normal file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env bash
builtcontent=$(readlink -f '../shlink_build_tmp')
projectdir=$(pwd)
# Copy project content to temp dir
echo 'Copying project files...'
rm -rf "${builtcontent}"
mkdir "${builtcontent}"
cp -R "${projectdir}"/* "${builtcontent}"
cd ${builtcontent}
# Install dependencies
rm -r vendor
rm composer.lock
composer self-update
composer install --no-dev --optimize-autoloader
# Delete development files
echo 'Deleting dev files...'
rm build.sh
rm CHANGELOG.md
rm composer.*
rm LICENSE
rm php*
rm README.md
rm -r build
rm data/database.sqlite
rm data/{cache,log,proxies}/{*,.gitignore}
rm config/params/{*,.gitignore}
rm config/autoload/{*.local.php{,.dist},.gitignore}
# Compressing file