2023-06-03 16:05:27 +02:00
|
|
|
#!/bin/bash
|
2023-08-15 15:34:15 +02:00
|
|
|
SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
2023-07-26 16:42:21 +02:00
|
|
|
WD=`pwd`
|
2023-08-22 23:11:50 +02:00
|
|
|
# get the current vuejs mode
|
|
|
|
VUEMODE=`$SCRIPTDIR/vuemode.sh query`
|
|
|
|
if [[ $? -eq 1 ]]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# switch vuejs to prod mode
|
|
|
|
$SCRIPTDIR/vuemode.sh prod
|
|
|
|
|
|
|
|
# run the grunt script in the scripts working directory
|
|
|
|
# so we can be sure all javascript is properly built from the most recent source
|
|
|
|
cd $SCRIPTDIR
|
|
|
|
grunt amd
|
2023-07-26 16:42:21 +02:00
|
|
|
|
|
|
|
# run the build php script
|
2023-08-15 15:34:15 +02:00
|
|
|
php ${SCRIPTDIR}/build.php $@
|
2023-07-26 16:42:21 +02:00
|
|
|
|
2023-08-22 23:11:50 +02:00
|
|
|
if [[ "$VUEMODE" == "dev" ]]; then
|
|
|
|
# switch vuejs vack to original mode
|
|
|
|
$SCRIPTDIR/vuemode.sh $VUEMODE
|
|
|
|
|
|
|
|
# re-do the grunt compiling
|
|
|
|
grunt amd
|
|
|
|
fi
|
|
|
|
|
2023-07-26 16:42:21 +02:00
|
|
|
# return to the working directory
|
|
|
|
cd $WD
|