29 lines
731 B
Bash
Executable File
29 lines
731 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
PROJECT_DIR=$(realpath $SCRIPT_DIR/../../)
|
|
ENV_DIR=$(realpath $PROJECT_DIR/../../../)
|
|
CWD=$(pwd)
|
|
|
|
source $ENV_DIR/bin/denv_msg
|
|
source $ENV_DIR/bin/drun
|
|
|
|
|
|
# Pull branch in project directory
|
|
denv_echo_msg "[frontend]: Git pull"
|
|
cd "$PROJECT_DIR"
|
|
git pull
|
|
denv_success_msg "[frontend]: Git pull done"
|
|
|
|
# Install node Packages
|
|
denv_echo_msg "[frontend]: NPM install"
|
|
drun frontend npm install
|
|
denv_success_msg "[frontend]: NPM install done"
|
|
|
|
# Initial build of website
|
|
denv_echo_msg "[frontend]: NPM run build"
|
|
drun frontend npm run build
|
|
denv_success_msg "[frontend]: NPM run build done"
|
|
|
|
# Switch back to current working directory
|
|
cd "$CWD" |