diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 455304b..827325e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,17 +15,8 @@ android { applicationId = "me.lecaro.breakout" minSdk = 21 targetSdk = 34 -// versionCode = 7 -// versionName = "7.0" - - // Get the current Unix timestamp in seconds - versionCode = (System.currentTimeMillis() / 1000/60).toInt() - // Get the current date as a string - versionName = ZonedDateTime.now(ZoneId.of("CET")) - .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) - - - + versionCode = 28993740 + versionName = "2025-02-15 14:00:57" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html index c1b6dfa..62f39b0 100644 --- a/app/src/main/assets/index.html +++ b/app/src/main/assets/index.html @@ -8,14 +8,14 @@ /> Breakout 𝟕𝟏 - + - - + + diff --git a/breakout.zip b/breakout.zip new file mode 100644 index 0000000..74e0134 Binary files /dev/null and b/breakout.zip differ diff --git a/deploy.sh b/deploy.sh index 78ca82d..2177eb1 100755 --- a/deploy.sh +++ b/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"