mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 22:46:15 -04:00
wip
This commit is contained in:
parent
a38e8f418e
commit
907f078304
4 changed files with 14 additions and 16 deletions
11
deploy.sh
11
deploy.sh
|
@ -1,13 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
#Randomly shuffle the version ids
|
||||
# Invalidate web cache
|
||||
# Generate a random number between 1000 and 9999
|
||||
random_number=$(shuf -i 1000-9999 -n 1)
|
||||
|
||||
# Use sed to replace the pattern with the random number
|
||||
sed -i "s/\?v=[0-9]*/\?v=$random_number/g" ./app/src/main/assets/index.html
|
||||
|
||||
|
||||
# Replace the version code and name in gradle for fdroid and play store
|
||||
versionCode=$(($(date +%s) / 60))
|
||||
versionName=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
sed -i '' -e "s/^[[:space:]]*versionCode = .*/ versionCode = $versionCode/" \
|
||||
-e "s/^[[:space:]]*versionName = .*/ versionName = \"$versionName\"/" \
|
||||
./app/build.gradle.kts
|
||||
|
||||
|
||||
DOMAIN="breakout.lecaro.me"
|
||||
PUBLIC_CONTENT="./app/src/main/assets/"
|
||||
ssh staging "mkdir -p /opt/mup-nginx-proxy/config/html/static_sites/$DOMAIN"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue