Added build script
This commit is contained in:
parent
3f2e611ce1
commit
68ee64e1a8
13
01-build.sh
Normal file
13
01-build.sh
Normal 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"
|
||||
Reference in New Issue
Block a user