-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,33 +4,38 @@ | |
set -e | ||
|
||
# Build the classic UI and move it into "dist-volumio" | ||
echo "Building Volumio UI" | ||
npm run build:volumio && mv dist dist-volumio | ||
|
||
# Build the v3 UI and move it into "dist-volumio3" | ||
echo "Building Volumio3 UI" | ||
npm run build:volumio3 && mv dist dist-volumio3 | ||
|
||
# Copy the classic UI into the folder which will be deployed to Firebase | ||
cp -r dist-volumio firebase-hosting | ||
|
||
# Store actual directory | ||
P_DIR=$(pwd) | ||
|
||
# Configure GIT user | ||
echo "Configuring Git User" | ||
git config --global user.name "Volumio" | ||
git config --global user.email "[email protected]" | ||
|
||
# Push classic UI on 'dist' branch | ||
cd "${P_DIR}/dist-volumio" | ||
echo "Preparing dist branch" | ||
cd "dist-volumio" | ||
# Fallback to 127.0.0.1 (for Ui on non-networked systems) | ||
echo "Writing local-config.json" | ||
echo '{"localhost": "http://127.0.0.1:3000"}' > app/local-config.json | ||
echo "Initializing Git Repo" | ||
git init && git add . && git commit -m "Deploy to dist branch" | ||
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:dist > /dev/null 2>&1 | ||
|
||
cd .. | ||
|
||
# Push v3 UI on 'dist3' branch | ||
cd "${P_DIR}/dist-volumio3" | ||
echo "Preparing dist3 branch" | ||
cd "dist-volumio3" | ||
# Fallback to 127.0.0.1 (for Ui on non-networked systems) | ||
echo "Writing local-config.json" | ||
echo '{"localhost": "http://127.0.0.1:3000"}' > app/local-config.json | ||
git init && git add . && git commit -m "Deploy to dist branch" | ||
echo "Initializing Git Repo" | ||
git init && git add . && git commit -m "Deploy to dist3 branch" | ||
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:dist3 > /dev/null 2>&1 | ||
|
||
cd "${P_DIR}" | ||
cd .. |