Move releases + auto-update feed from Codeberg to git.utn.lol
Codeberg is now mirror-only. Feed URL -> git.utn.lol/enki/blap rolling "updates" release; release-codeberg.mjs renamed release-forge.mjs with git.utn.lol defaults (FORGE_* env overrides unchanged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,10 +46,11 @@ pnpm exec asar p ../web/webapp webapp.asar
|
||||
VARIANT_PATH=blap/build.json pnpm run build -- --linux --win
|
||||
```
|
||||
|
||||
Publishing a release (uploads the built artifacts to the Codeberg release):
|
||||
Publishing a release (uploads the built artifacts to the git.utn.lol release —
|
||||
push the version tag first, `git push origin vX.Y.Z`):
|
||||
|
||||
```bash
|
||||
CODEBERG_TOKEN=xxxx node apps/desktop/scripts/release-codeberg.mjs
|
||||
FORGE_TOKEN=xxxx node apps/desktop/scripts/release-forge.mjs
|
||||
```
|
||||
|
||||
## License & credits
|
||||
|
||||
@@ -128,15 +128,15 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
|
||||
electron_appId: variant.appId,
|
||||
electron_protocol: variant.protocols[0],
|
||||
},
|
||||
// Codeberg release feed for electron-updater. electron-builder bakes this into
|
||||
// git.utn.lol release feed for electron-updater. electron-builder bakes this into
|
||||
// app-update.yml and generates the channel files (latest.yml / latest-linux.yml).
|
||||
// "generic" = download-only (upload is handled by scripts/release-codeberg.mjs).
|
||||
// Forgejo/Codeberg has NO GitHub-style /releases/latest/download/ route (404s),
|
||||
// "generic" = download-only (upload is handled by scripts/release-forge.mjs).
|
||||
// Gitea/Forgejo has NO GitHub-style /releases/latest/download/ route (404s),
|
||||
// so the feed is a rolling release on the fixed tag "updates" that
|
||||
// release-codeberg.mjs re-points at every ship.
|
||||
// release-forge.mjs re-points at every ship.
|
||||
publish: {
|
||||
provider: "generic",
|
||||
url: "https://codeberg.org/Enkisu/Blap/releases/download/updates/",
|
||||
url: "https://git.utn.lol/enki/blap/releases/download/updates/",
|
||||
channel: "latest",
|
||||
},
|
||||
linux: {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env node
|
||||
/*
|
||||
* Upload built desktop artifacts to a Gitea/Forgejo release (Codeberg IS Forgejo, and
|
||||
* git.utn.lol is Gitea — same API) so electron-updater (generic provider ->
|
||||
* .../releases/latest/download/) can find them.
|
||||
* Upload built desktop artifacts to a Gitea/Forgejo release (git.utn.lol is Gitea,
|
||||
* Codeberg is Forgejo — same API) so electron-updater (generic provider) can find them.
|
||||
*
|
||||
* Run AFTER `pnpm run build` from apps/desktop. Defaults target Codeberg:
|
||||
* CODEBERG_TOKEN=xxxx node scripts/release-codeberg.mjs [tag]
|
||||
* Target a different forge (e.g. the git.utn.lol Gitea) via env overrides:
|
||||
* FORGE_API=https://git.utn.lol/api/v1 FORGE_OWNER=enki FORGE_REPO=blap \
|
||||
* FORGE_TOKEN=xxxx node scripts/release-codeberg.mjs [tag]
|
||||
* Run AFTER `pnpm run build` from apps/desktop. Defaults target git.utn.lol (the
|
||||
* primary repo — Codeberg is a mirror only and no longer hosts releases):
|
||||
* FORGE_TOKEN=xxxx node scripts/release-forge.mjs [tag]
|
||||
* Target a different forge (e.g. Codeberg) via env overrides:
|
||||
* FORGE_API=https://codeberg.org/api/v1 FORGE_OWNER=Enkisu FORGE_REPO=Blap \
|
||||
* FORGE_TOKEN=xxxx node scripts/release-forge.mjs [tag]
|
||||
*
|
||||
* - tag defaults to "v<version>" from package.json.
|
||||
* - Uploads latest.yml / latest-linux.yml + installers + blockmaps.
|
||||
@@ -22,9 +22,9 @@ import { execFileSync } from "node:child_process";
|
||||
import { basename, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const OWNER = process.env.FORGE_OWNER ?? "Enkisu";
|
||||
const REPO = process.env.FORGE_REPO ?? "Blap";
|
||||
const API = process.env.FORGE_API ?? "https://codeberg.org/api/v1";
|
||||
const OWNER = process.env.FORGE_OWNER ?? "enki";
|
||||
const REPO = process.env.FORGE_REPO ?? "blap";
|
||||
const API = process.env.FORGE_API ?? "https://git.utn.lol/api/v1";
|
||||
|
||||
const token = process.env.FORGE_TOKEN ?? process.env.CODEBERG_TOKEN;
|
||||
if (!token) {
|
||||
@@ -57,10 +57,10 @@ async function api(path, init = {}) {
|
||||
async function getOrCreateRelease(tagName, { prerelease = false } = {}) {
|
||||
let res = await api(`/repos/${OWNER}/${REPO}/releases/tags/${encodeURIComponent(tagName)}`);
|
||||
if (res.status === 404) {
|
||||
// The tag MUST already exist on the forge, arriving via the git.utn.lol
|
||||
// push-mirror. If we let the release API auto-create it, the next mirror
|
||||
// sync prunes the forge-only tag and Forgejo silently demotes the release
|
||||
// to a hidden draft (this ate v1.0.2's release page overnight).
|
||||
// The tag MUST already exist on the forge (git push origin <tag> first).
|
||||
// On a mirror target, letting the release API auto-create the tag means the
|
||||
// next mirror sync prunes it and the release silently demotes to a hidden
|
||||
// draft (this ate v1.0.2's Codeberg release page overnight).
|
||||
const tagRes = await api(`/repos/${OWNER}/${REPO}/tags/${encodeURIComponent(tagName)}`);
|
||||
if (tagRes.status === 404) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user