2025-02-15 19:21:00 +01:00
|
|
|
#!/bin/bash
|
2025-03-13 08:55:25 +01:00
|
|
|
|
2025-03-18 14:16:12 +01:00
|
|
|
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
|
|
|
|
|
2025-04-07 15:25:58 +02:00
|
|
|
if grep -rE "course|atout" src/i18n/fr.json
|
|
|
|
then
|
|
|
|
echo "Bad automatic translations"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2025-03-15 10:34:01 +01:00
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2025-03-14 22:21:47 +01:00
|
|
|
versionCode=$(($(date +%s) / 60))
|
|
|
|
|
|
|
|
bash ./build.sh $versionCode
|
|
|
|
|
2025-04-12 08:50:28 +02:00
|
|
|
|
|
|
|
# generate signed apk for itch.io
|
|
|
|
./gradlew assembleRelease
|
|
|
|
|
|
|
|
# generate signed bundle for play store
|
|
|
|
./gradlew bundleRelease
|
|
|
|
|
|
|
|
|
2025-03-29 21:05:53 +01:00
|
|
|
# Create a release commit
|
2025-03-14 22:21:47 +01:00
|
|
|
git add .
|
|
|
|
git commit -m "Build $versionCode"
|
|
|
|
git push
|
2025-03-29 21:05:53 +01:00
|
|
|
# Auto tagging created random releases on fdroid, not great.
|
|
|
|
# git tag -a $versionCode -m $versionCode
|
2025-02-15 20:47:26 +01:00
|
|
|
|
2025-03-05 19:50:17 +01:00
|
|
|
# upload to breakout.lecaro.me
|
2025-02-15 19:21:00 +01:00
|
|
|
DOMAIN="breakout.lecaro.me"
|
2025-03-19 18:13:41 +01:00
|
|
|
PUBLIC_CONTENT="./build/*"
|
2025-03-05 22:10:17 +01:00
|
|
|
|
2025-02-15 19:21:00 +01:00
|
|
|
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
|
|
|
|
|
2025-03-05 22:46:37 +01:00
|
|
|
# upload to itch.io , upload the index file directly
|
2025-03-19 18:13:41 +01:00
|
|
|
butler push "./build/index.html" renanlecaro/breakout71:latest --userversion $versionCode
|
|
|
|
butler push "./build/index.html" renanlecaro/breakout71:offline --userversion $versionCode
|
2025-04-02 17:46:34 +02:00
|
|
|
butler push app/build/outputs/apk/release/app-release.apk renanlecaro/breakout71:apk --userversion $versionCode
|
2025-03-14 22:21:47 +01:00
|
|
|
|
2025-04-05 10:38:18 +02:00
|
|
|
# archive the output files
|
|
|
|
FOLDER="/opt/mup-nginx-proxy/config/html/static_sites/archive.lecaro.me/public-files/b71/$versionCode"
|
|
|
|
ssh staging "mkdir -p $FOLDER"
|
2025-04-05 11:10:55 +02:00
|
|
|
rsync -vz "./build/index.html" staging:$FOLDER/b71-$versionCode.html
|
|
|
|
rsync -vz "./app/build/outputs/apk/release/app-release.apk" staging:$FOLDER/b71-$versionCode.apk
|
2025-04-05 10:38:18 +02:00
|
|
|
|
|
|
|
|