2016-08-15 02:45:09 -05:00
|
|
|
#!/usr/bin/env bash
|
2016-08-15 02:52:44 -05:00
|
|
|
set -e
|
2016-08-15 02:45:09 -05:00
|
|
|
|
|
|
|
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}"
|
2016-08-15 03:03:17 -05:00
|
|
|
cd "${builtcontent}"
|
2016-08-15 02:45:09 -05:00
|
|
|
|
|
|
|
# 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
|
2016-08-15 03:03:17 -05:00
|
|
|
rm -f data/database.sqlite
|
|
|
|
rm -f data/{cache,log,proxies}/{*,.gitignore}
|
|
|
|
rm -f config/params/{*,.gitignore}
|
|
|
|
rm -f config/autoload/{{,*.}local.php{,.dist},.gitignore}
|
2016-08-15 02:45:09 -05:00
|
|
|
|
|
|
|
# Compressing file
|