Skip to content

Commit

Permalink
feat(scripts): update bundle.sh to do npm operations
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Jul 18, 2021
1 parent 924e15f commit ecfa656
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions scripts/bundle.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
#!/bin/bash
# Script used to build GUI version and bundle executables for Windows/Linux/MacOS
# Require Go and Node/Npm installed
# You must locate your terminal into the scripts sub-folder before running this script

# Check if pwd is located inside the IGopher gui-bundler folder
if [ $(basename "$PWD") != "gui-bundler" ]; then
cd "${0%/*}/../cmd/igopher/gui-bundler"
if [ $(basename "$PWD") != "gui-bundler" ]; then
echo "Invalid current directory! Please cd to the IGopher directory and re-run this script."
# Check if pwd is located inside the "scripts" sub-folder
if [ $(basename "$PWD") != "scripts" ]; then
cd "scripts"
if [ $(basename "$PWD") != "scripts" ]; then
echo "Invalid current directory! Please cd to the IGopher scripts sub-directory and re-run this script."
exit 1
fi
fi

cd "../resources/static/vue-igopher"

# Install node dependencies and build vue-igopher
npm install
npm run build

cd "../../../cmd/igopher/gui-bundler"

# Download and install go-astilectron-bundler
go get github.com/asticode/go-astilectron-bundler/...
go install github.com/asticode/go-astilectron-bundler/astilectron-bundler
Expand Down

0 comments on commit ecfa656

Please sign in to comment.