Renamed the dist directory to apply the gitignore to it

This commit is contained in:
Renan LE CARO 2025-03-19 18:13:41 +01:00
parent 1839977fed
commit afd0ccd5fc
13 changed files with 3782 additions and 60 deletions

View file

@ -11,8 +11,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
versionCode = 29040063
versionName = "29040063"
versionCode = 29040073
versionName = "29040073"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true

File diff suppressed because one or more lines are too long

View file

@ -35,15 +35,14 @@ sed -i -e "s/VERSION = .*/ VERSION = '$versionCode'/" ./src/PWA/sw-b71.js
# remove all exif metadata from pictures, because i think fdroid doesn't like that. odd
find -name '*.jp*g' -o -name '*.png' | xargs exiftool -all=
find -name '*.jp*g' -o -name '*.png' | xargs exiftool -all= -overwrite_original
npx prettier --write src/
npx jest
rm -rf dist/*
npx parcel build src/index.html
rm -rf build/*
npx parcel build src/index.html --dist-dir build
rm -rf ./app/src/main/assets/*
cp public/* dist
cp public/* build
rm -rf ./app/src/main/assets/*
cp dist/index.html ./app/src/main/assets/
cp build/index.html ./app/src/main/assets/

View file

@ -21,12 +21,12 @@ git push
# upload to breakout.lecaro.me
DOMAIN="breakout.lecaro.me"
PUBLIC_CONTENT="./dist/*"
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 "./dist/index.html" renanlecaro/breakout71:latest --userversion $versionCode
butler push "./dist/index.html" renanlecaro/breakout71:offline --userversion $versionCode
butler push "./build/index.html" renanlecaro/breakout71:latest --userversion $versionCode
butler push "./build/index.html" renanlecaro/breakout71:offline --userversion $versionCode

View file

@ -1 +0,0 @@
{"short_name":"B71","name":"Breakout 71","icons":[{"src":"/icon.cad232de.svg","sizes":"48x48 72x72 96x96 128x128 256x256 512x512","type":"image/svg+xml","purpose":"any"},{"src":"/icon-128.07cda280.png","sizes":"128x128","type":"image/png"}],"start_url":"/index.html?isPWA=true","display":"fullscreen","theme_color":"#5DA3EA","background_color":"#ffffff"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"><path fill="#6262EA" d="M0 0h300v100H0zM200 100h100v100H200zM100 200h100v200H100z"/><path fill="#5DA3EA" d="M200 200h100v100H200zM300 100h100v300H300zM200 400h300v100H200z"/></svg>

Before

Width:  |  Height:  |  Size: 245 B

3767
dist/index.html vendored

File diff suppressed because one or more lines are too long

39
dist/privacy.html vendored
View file

@ -1,39 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Breakout 71 privacy policy</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🕹️</text></svg>">
<style type="text/css">
body {
max-width: 800px;
margin: 40px auto;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>Privacy policy</h1>
<p>
<a href="https://breakout.lecaro.me">Breakout 71</a> is published
by Renan LE CARO, a French citizen and programmer. You can contact me at
this adress : breakout71@lecaro.me
</p>
<p>
If you access breakout.lecaro.me though a web browser, your IP address
will be logged on my server to prevent abuses.
<a href="https://staging.lecaro.me/">My server</a> is hosted by Hetzner
Online GmbH in germany.
</p>
<p>
If you install the app through google play or f-droid, no information will
be collected at all by me.
</p>
</body>
</html>

View file

@ -1,5 +1,5 @@
// The version of the cache.
const VERSION = "29040063";
const VERSION = "29040073";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29040063"
"29040073"

View file

@ -514,7 +514,7 @@ export function repulse(
) {
const distance = distanceBetween(a, b);
// Ensure we don't get soft locked
const max = gameState.gameZoneWidth / 2;
const max = gameState.gameZoneWidth / 4;
if (distance > max) return;
// Unit vector
const dx = (a.x - b.x) / distance;
@ -569,7 +569,7 @@ export function repulse(
export function attract(gameState: GameState, a: Ball, b: Ball, power: number) {
const distance = distanceBetween(a, b);
// Ensure we don't get soft locked
const min = gameState.gameZoneWidth * 0.5;
const min = (gameState.gameZoneWidth * 3) / 4;
if (distance < min) return;
// Unit vector
const dx = (a.x - b.x) / distance;

View file

@ -6,12 +6,11 @@ versionCode=$(($(date +%s) / 60))
bash ./build.sh $versionCode
# we don't add a version tag to let fdroid ignore this build
# upload to breakout-v3-staging.lecaro.me
DOMAIN="breakout-v3-staging.lecaro.me"
PUBLIC_CONTENT="./dist/*"
PUBLIC_CONTENT="./build/*"
ssh staging "mkdir -p /opt/mup-nginx-proxy/config/html/static_sites/$DOMAIN"
rsync -avz --delete $PUBLIC_CONTENT staging:/opt/mup-nginx-proxy/config/html/static_sites/$DOMAIN