This commit is contained in:
Renan LE CARO 2025-02-15 20:44:39 +01:00
parent a38e8f418e
commit 907f078304
4 changed files with 14 additions and 16 deletions

View file

@ -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

View file

@ -8,14 +8,14 @@
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Breakout 𝟕𝟏</title>
<link rel="stylesheet" href="style.css?v=5388" />
<link rel="stylesheet" href="style.css?v=4242" />
<link rel="icon" href="./icon.svg" />
</head>
<body>
<button id="menu"><span> menu</span></button>
<button id="score"></button>
<canvas id="game"></canvas>
<script src="levels.js?v=5388"></script>
<script src="game.js?v=5388"></script>
<script src="levels.js?v=4242"></script>
<script src="game.js?v=4242"></script>
</body>
</html>

BIN
breakout.zip Normal file

Binary file not shown.

View file

@ -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"