mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-20 04:05:06 -04:00
32 lines
924 B
Bash
Executable file
32 lines
924 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if grep -rE "T[O]DO|F[I]XME|console\.log" src
|
|
then
|
|
echo "You have left some TO""DO or logs"
|
|
exit 1
|
|
fi
|
|
|
|
set -e
|
|
set -x
|
|
|
|
versionCode=$(($(date +%s) / 60))
|
|
|
|
bash ./build.sh $versionCode
|
|
|
|
# Create a release commit and tag
|
|
git add .
|
|
git commit -m "Build $versionCode"
|
|
git tag -a $versionCode -m $versionCode
|
|
git push
|
|
|
|
# upload to breakout.lecaro.me
|
|
DOMAIN="breakout.lecaro.me"
|
|
PUBLIC_CONTENT="./build/*"
|
|
|
|
ssh staging "mkdir -p /opt/mup-nginx-proxy/config/html/static_sites/$DOMAIN"
|
|
rsync -avz --delete --delete-excluded --exclude="*.sh" --exclude="node_modules" --exclude="android" --exclude=".*" $PUBLIC_CONTENT staging:/opt/mup-nginx-proxy/config/html/static_sites/$DOMAIN
|
|
|
|
# upload to itch.io , upload the index file directly
|
|
butler push "./build/index.html" renanlecaro/breakout71:latest --userversion $versionCode
|
|
butler push "./build/index.html" renanlecaro/breakout71:offline --userversion $versionCode
|
|
|