Update build.sh
This commit is contained in:
parent
a3cc7dddd7
commit
57dcc7cb2d
31
build.sh
31
build.sh
|
@ -23,18 +23,11 @@ else
|
||||||
find src -type f \( -name "package.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5
|
find src -type f \( -name "package.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_md5_js=$(<last-js-build.md5)
|
new_md5_package=$(<last-package-build.md5)
|
||||||
if [ "$current_md5_js" != "$new_md5_js" ]
|
if [ "$current_md5_package" != "$new_md5_package" ]
|
||||||
then
|
then
|
||||||
npm run build
|
## Install composer dependencies
|
||||||
fi
|
npm install
|
||||||
### END npm build ###
|
|
||||||
|
|
||||||
new_md5_sass=$(<last-sass-build.md5)
|
|
||||||
if [ "$current_md5_sass" != "$new_md5_sass" ]
|
|
||||||
then
|
|
||||||
## Compile SASS
|
|
||||||
sh compile-sass.sh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_md5_composer=$(<last-composer-build.md5)
|
new_md5_composer=$(<last-composer-build.md5)
|
||||||
|
@ -44,13 +37,21 @@ then
|
||||||
composer install
|
composer install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_md5_package=$(<last-package-build.md5)
|
new_md5_sass=$(<last-sass-build.md5)
|
||||||
if [ "$current_md5_package" != "$new_md5_package" ]
|
if [ "$current_md5_sass" != "$new_md5_sass" ]
|
||||||
then
|
then
|
||||||
## Install composer dependencies
|
## Compile SASS
|
||||||
npm install
|
sh compile-sass.sh
|
||||||
fi
|
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"
|
echo "Updating files in $destination"
|
||||||
rm -rf $destination
|
rm -rf $destination
|
||||||
mkdir $destination
|
mkdir $destination
|
||||||
|
|
Loading…
Reference in New Issue