Update build.sh

This commit is contained in:
weryques 2018-01-29 15:33:52 -02:00
parent a3cc7dddd7
commit 57dcc7cb2d
1 changed files with 16 additions and 15 deletions

View File

@ -23,18 +23,11 @@ else
find src -type f \( -name "package.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5
fi
new_md5_js=$(<last-js-build.md5)
if [ "$current_md5_js" != "$new_md5_js" ]
new_md5_package=$(<last-package-build.md5)
if [ "$current_md5_package" != "$new_md5_package" ]
then
npm run build
fi
### END npm build ###
new_md5_sass=$(<last-sass-build.md5)
if [ "$current_md5_sass" != "$new_md5_sass" ]
then
## Compile SASS
sh compile-sass.sh
## Install composer dependencies
npm install
fi
new_md5_composer=$(<last-composer-build.md5)
@ -44,13 +37,21 @@ then
composer install
fi
new_md5_package=$(<last-package-build.md5)
if [ "$current_md5_package" != "$new_md5_package" ]
new_md5_sass=$(<last-sass-build.md5)
if [ "$current_md5_sass" != "$new_md5_sass" ]
then
## Install composer dependencies
npm install
## Compile SASS
sh compile-sass.sh
fi
new_md5_js=$(<last-js-build.md5)
if [ "$current_md5_js" != "$new_md5_js" ]
then
npm run build
fi
### END npm build ###
echo "Updating files in $destination"
rm -rf $destination
mkdir $destination