diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40dcf0b..08dea84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: - name: Upload debug APK uses: actions/upload-artifact@v4 with: - name: PilgrimsOfKatan-debug-apk + name: ProLibertateGames-debug-apk path: app/build/outputs/apk/debug/app-debug.apk if-no-files-found: error retention-days: 14 @@ -79,7 +79,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: PilgrimsOfKatan-reports + name: ProLibertateGames-reports path: | app/build/reports/ if-no-files-found: ignore @@ -109,7 +109,7 @@ jobs: stamp="$(( ${{ github.run_number }} + offset ))" version="v${series}.${stamp}-dev" src="app/build/outputs/apk/debug/app-debug.apk" - dest="PilgrimsOfKatan-${version}.apk" + dest="ProLibertateGames-${version}.apk" cp "$src" "$dest" echo "version=$version" >> "$GITHUB_OUTPUT" echo "apk=$dest" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6715723..e2314ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,7 @@ jobs: stamp="$(( ${{ github.run_number }} + offset ))" version="v${series}.${stamp}" src="app/build/outputs/apk/debug/app-debug.apk" - dest="PilgrimsOfKatan-${version}.apk" + dest="ProLibertateGames-${version}.apk" cp "$src" "$dest" echo "version=$version" >> "$GITHUB_OUTPUT" echo "apk=$dest" >> "$GITHUB_OUTPUT" @@ -72,7 +72,7 @@ jobs: - name: Upload APK as workflow artifact uses: actions/upload-artifact@v4 with: - name: PilgrimsOfKatan-apk + name: ProLibertateGames-apk path: ${{ steps.stage.outputs.apk }} if-no-files-found: error diff --git a/CLAUDE.md b/CLAUDE.md index c1cfd52..a2b62af 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ ProLibertateGames — Wallacenet's build of an Android collection of card and board games, playable against AI or over Wi-Fi (LAN). Upstream: [adrianoftyriel/ProLibertateGames](https://github.com/adrianoftyriel/ProLibertateGames) (GPL-3.0, kept as the `upstream` remote). Canonical repo: -. +. ## Ground rules @@ -46,7 +46,7 @@ One flag — `isDevBuild` in `app/build.gradle.kts` — drives applicationId, launcher name and brand colour together. Never set them individually. In-app OTA points at this repo's own Gitea releases -(`/api/v1/repos/devadmin/PilgrimsOfKatan/releases…`) and is **on**: +(`/api/v1/repos/devadmin/ProLibertateGames/releases…`) and is **on**: `BuildConfig.OTA_ENABLED` is `true`. The channel is a decision already made and recorded — `docs/CI.md` documents the endpoints, the build-number scheme, and what publishing requires. Setting the flag to `false` is the kill switch. diff --git a/README.md b/README.md index 451c55f..f45f7f5 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ or against other people over Wi-Fi (LAN). Wallacenet's build of [ProLibertateGames](https://github.com/adrianoftyriel/ProLibertateGames) by adrianoftyriel (GNU GPL v3 — see [LICENSE](LICENSE)), hosted at -. Game rules documentation +. Game rules documentation lives under [docs/](docs/README.md); build, CI and release decisions live in [docs/CI.md](docs/CI.md). Katan itself arrives in later work — it is listed under Board Games as *Coming soon* — and this app ships the reference catalogue diff --git a/app/src/main/java/org/prolibertate/games/net/LanTransport.kt b/app/src/main/java/org/prolibertate/games/net/LanTransport.kt index 0146f73..1976c05 100644 --- a/app/src/main/java/org/prolibertate/games/net/LanTransport.kt +++ b/app/src/main/java/org/prolibertate/games/net/LanTransport.kt @@ -308,6 +308,6 @@ class LanTransport(private val context: Context) : Transport { } const val CONNECT_TIMEOUT_MS = 8_000 - const val WIFI_LOCK_TAG = "PilgrimsOfKatan:lan" + const val WIFI_LOCK_TAG = "ProLibertateGames:lan" } } diff --git a/app/src/main/java/org/prolibertate/games/net/Protocol.kt b/app/src/main/java/org/prolibertate/games/net/Protocol.kt index 61d7221..08a919f 100644 --- a/app/src/main/java/org/prolibertate/games/net/Protocol.kt +++ b/app/src/main/java/org/prolibertate/games/net/Protocol.kt @@ -33,7 +33,7 @@ const val PURPOSE_SCOREKEEPER = "scorekeeper" /** Service type and name advertised over mDNS. */ const val SERVICE_TYPE = "_plgames._tcp" -const val SERVICE_NAME = "PilgrimsOfKatan" +const val SERVICE_NAME = "ProLibertateGames" val protocolJson: Json = Json { ignoreUnknownKeys = true diff --git a/app/src/main/java/org/prolibertate/games/update/Updater.kt b/app/src/main/java/org/prolibertate/games/update/Updater.kt index 69977b8..6dea313 100644 --- a/app/src/main/java/org/prolibertate/games/update/Updater.kt +++ b/app/src/main/java/org/prolibertate/games/update/Updater.kt @@ -126,7 +126,7 @@ class Updater(private val activity: Activity) { (URL(url).openConnection() as HttpURLConnection).apply { requestMethod = "GET" setRequestProperty("Accept", "application/json") - setRequestProperty("User-Agent", "PilgrimsOfKatan-Updater") + setRequestProperty("User-Agent", "ProLibertateGames-Updater") connectTimeout = 15_000 readTimeout = 15_000 } @@ -206,7 +206,7 @@ class Updater(private val activity: Activity) { const val SERVER = "https://git.wallacenet.ca" const val SERVER_HOST = "git.wallacenet.ca" const val OWNER = "devadmin" - const val REPO = "PilgrimsOfKatan" + const val REPO = "ProLibertateGames" /** Release routes, Gitea's `/api/v1` spelling of GitHub's API. */ const val API = "$SERVER/api/v1/repos/$OWNER/$REPO" diff --git a/app/src/test/java/org/prolibertate/games/update/UpdatePolicyTest.kt b/app/src/test/java/org/prolibertate/games/update/UpdatePolicyTest.kt index 213b7f4..1db5a65 100644 --- a/app/src/test/java/org/prolibertate/games/update/UpdatePolicyTest.kt +++ b/app/src/test/java/org/prolibertate/games/update/UpdatePolicyTest.kt @@ -22,7 +22,7 @@ class UpdatePolicyTest { tag = tag, versionCode = versionCode, apkUrl = "https://example.invalid/$tag.apk", - apkName = "PilgrimsOfKatan-$tag.apk", + apkName = "ProLibertateGames-$tag.apk", channel = channel, ) @@ -60,16 +60,16 @@ class UpdatePolicyTest { // The instance reports its canonical host; the app was told to trust // another. Same bytes, one host, whatever the server names itself. assertEquals( - "https://git.wallacenet.ca/devadmin/PilgrimsOfKatan/releases/download/" + - "v1.4.1001-dev/PilgrimsOfKatan-v1.4.1001-dev.apk", + "https://git.wallacenet.ca/devadmin/ProLibertateGames/releases/download/" + + "v1.4.1001-dev/ProLibertateGames-v1.4.1001-dev.apk", onReportedHost( - "https://git.saskvalleytech.com/devadmin/PilgrimsOfKatan/releases/download/" + - "v1.4.1001-dev/PilgrimsOfKatan-v1.4.1001-dev.apk", + "https://git.saskvalleytech.com/devadmin/ProLibertateGames/releases/download/" + + "v1.4.1001-dev/ProLibertateGames-v1.4.1001-dev.apk", "git.wallacenet.ca", ), ) // A URL that already says the right host is left exactly as it is. - val already = "https://git.wallacenet.ca/devadmin/PilgrimsOfKatan/releases/download/v1.4.1/a.apk" + val already = "https://git.wallacenet.ca/devadmin/ProLibertateGames/releases/download/v1.4.1/a.apk" assertEquals(already, onReportedHost(already, "git.wallacenet.ca")) // Anything unparseable survives untouched rather than being dropped. assertEquals("not a url", onReportedHost("not a url", "git.wallacenet.ca")) diff --git a/docs/CI.md b/docs/CI.md index 4032e58..7208c81 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -1,11 +1,11 @@ # CI, releases, and OTA — decisions and how to build -Status as of the Pilgrims of Katan bootstrap (WALA-118). +Status as of the ProLibertateGames bootstrap (WALA-118). ## Decisions 1. **The release channel is this instance's own releases.** The app ships from - , and the in-app updater + , and the in-app updater reads that repo's releases over Gitea's REST API. GitHub is not a channel for this project; the only GitHub URLs left are the `upstream` remote and the attribution link in the README. @@ -113,8 +113,8 @@ so a retry is safe. | Channel | Endpoint | | --- | --- | -| production | `GET /api/v1/repos/devadmin/PilgrimsOfKatan/releases/latest` | -| dev | `GET /api/v1/repos/devadmin/PilgrimsOfKatan/releases?limit=30` | +| production | `GET /api/v1/repos/devadmin/ProLibertateGames/releases/latest` | +| dev | `GET /api/v1/repos/devadmin/ProLibertateGames/releases?limit=30` | - `/releases/latest` is documented by Gitea as *the most recent non-prerelease, non-draft release* — the same rule GitHub implements, so the production @@ -126,7 +126,7 @@ so a retry is safe. `prerelease`, `draft`, and assets carrying `browser_download_url`. Gitea says `limit` where GitHub says `per_page`. - Each asset must be named so it contains its tag — - `PilgrimsOfKatan-v1.4.1001.apk` for tag `v1.4.1001` — because the updater + `ProLibertateGames-v1.4.1001.apk` for tag `v1.4.1001` — because the updater picks the versioned APK out of the release's assets by that rule. `BuildConfig.OTA_ENABLED` is a kill switch, not a channel decision: it is diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index 8ff208a..07d504f 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -11,7 +11,7 @@ # Environment: # GITEA_TOKEN required — a token that may create releases on the repo. # GITEA_API API base, default https://git.wallacenet.ca/api/v1 -# GITEA_REPO owner/name, default devadmin/PilgrimsOfKatan +# GITEA_REPO owner/name, default devadmin/ProLibertateGames # # The four arguments can also arrive as RELEASE_TAG, RELEASE_APK, # RELEASE_KIND and RELEASE_TARGET, which is how the workflows pass them. @@ -34,7 +34,7 @@ esac [ -f "$apk" ] || { echo "publish-release: no such APK: ${apk:-}" >&2; exit 2; } [ -n "${GITEA_TOKEN:-}" ] || { echo "publish-release: GITEA_TOKEN is not set" >&2; exit 2; } -api="${GITEA_API:-${GITHUB_API_URL:-https://git.wallacenet.ca/api/v1}}/repos/${GITEA_REPO:-${GITHUB_REPOSITORY:-devadmin/PilgrimsOfKatan}}" +api="${GITEA_API:-${GITHUB_API_URL:-https://git.wallacenet.ca/api/v1}}/repos/${GITEA_REPO:-${GITHUB_REPOSITORY:-devadmin/ProLibertateGames}}" tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT INT TERM @@ -43,7 +43,7 @@ trap 'rm -rf "$tmp"' EXIT INT TERM # updater picks the versioned APK out of a release's assets by finding the one # whose name contains the tag, so an asset called app-debug.apk would only be # found by the fallback rule. -apk_name="PilgrimsOfKatan-${tag}.apk" +apk_name="ProLibertateGames-${tag}.apk" # The tag and the file name are both derived from gradle.properties and a run # number, so neither can carry a quote or a backslash into this JSON. @@ -56,7 +56,7 @@ else fi cat > "$tmp/release.json" <