Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
volumio committed May 5, 2024
1 parent 5b1602d commit cc800b3
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions travis-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..

0 comments on commit cc800b3

Please sign in to comment.