From 68ee64e1a8f313482f3dc886e2f553bbc2eeb6bd Mon Sep 17 00:00:00 2001 From: pepper Date: Thu, 21 Jan 2021 01:45:43 -0500 Subject: [PATCH] Added build script --- 01-build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 01-build.sh 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