Added build script

This commit is contained in:
pepper 2021-01-21 01:45:43 -05:00
parent 3f2e611ce1
commit 68ee64e1a8

13
01-build.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
# Author: Ben&Jamyn
# Date: 21/01/2021
PROJ_DIR="/home/dev/MigratorProject-frontend"
echo "Removing old build files"
# Remove old build files
rm -rf $PROJ_DIR/build*
echo "Building site and creating zip"
# Build the site and zip it with the .htaccess
npm run-script build && cd build && zip -r $PROJ_DIR/build.zip $PROJ_DIR/build/* && zip -r $PROJ_DIR/build.zip $PROJ_DIR/build/.htaccess* && echo "Successfully built" || echo "Build Failed"