diff --git a/01-build.sh b/01-build.sh new file mode 100644 index 0000000..40bc56e --- /dev/null +++ b/01-build.sh @@ -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" \ No newline at end of file