Skip to content

Commit

Permalink
Merge pull request #115 from ubclaunchpad/rmcreyes/#114-fetch-unity-b…
Browse files Browse the repository at this point in the history
…inaries-on-deploy

Fetch Unity binaries on deployment
  • Loading branch information
eloisepeng authored Mar 21, 2020
2 parents fcf11d4 + 52e1232 commit 39350bd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "react-scripts test",
"start": "scripts/app_start.sh",
"build": "react-scripts build",
"deploy": "gh-pages -d build"
"deploy": "scripts/app_deploy.sh"
},
"author": "UBC Launch Pad",
"license": "ISC",
Expand Down
7 changes: 7 additions & 0 deletions scripts/app_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Fetch Unity minigame binaries
scripts/unity_fetch.sh

# Deploy app
gh-pages -d build
14 changes: 2 additions & 12 deletions scripts/app_start.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
#!/usr/bin/env bash

# Get minigames release version
release=$(head -n 1 release.txt)
binary_location="https://github.com/ubclaunchpad/ubcsim2/releases/download/${release}/ubcsim2-minigames${release}.zip"

# Get Unity binaries from release on GitHub
rm -rf temp
rm -rf public/unity
mkdir temp
mkdir public/unity
wget ${binary_location} -O temp/unity.zip
unzip temp/unity.zip -d temp
cp -r temp/ubcsim2-minigames${release}/* public/unity/
# Fetch Unity minigame binaries
scripts/unity_fetch.sh

# Start app
react-scripts start
14 changes: 14 additions & 0 deletions scripts/unity_fetch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Get minigames release version
release=$(head -n 1 release.txt)
binary_location="https://github.com/ubclaunchpad/ubcsim2/releases/download/${release}/ubcsim2-minigames${release}.zip"

# Get Unity binaries from release on GitHub
rm -rf temp
rm -rf public/unity
mkdir temp
mkdir public/unity
wget ${binary_location} -O temp/unity.zip
unzip temp/unity.zip -d temp
cp -r temp/ubcsim2-minigames${release}/* public/unity/

0 comments on commit 39350bd

Please sign in to comment.