[repo] FabricaRelease: Rosea as a Fabrica app: the release and e2e pipelines, the Aula page's words and pictures, the version check, the APK signed in Custos, domi-rosea:// from the installer, the phone target
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* `pnpm --filter @rosea/tauri sign:apk <version> <commit>`: the release APK, signed in Custos
|
||||
* (fabrica-release.md F4). Runs after the release's approval; Mark's card shows the match code
|
||||
* custos-sign prints. Nothing is written unless custos-sign signs and verifies.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { existsSync, mkdirSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { custosSign, signArgs, signedApkName, UNSIGNED_APK } from '../src/sign-apk.js';
|
||||
import { PACKAGE, SRC_TAURI } from './tauri.js';
|
||||
|
||||
const [version = '', commit = ''] = process.argv.slice(2);
|
||||
try {
|
||||
const unsigned = join(SRC_TAURI, UNSIGNED_APK);
|
||||
if (!existsSync(unsigned)) throw new Error(`no release APK at ${unsigned}; run 'pnpm tauri:android-release' first`);
|
||||
const outDir = join(PACKAGE, '..', '..', 'target', 'release');
|
||||
mkdirSync(outDir, { recursive: true });
|
||||
const exe = custosSign(process.env, existsSync);
|
||||
const args = signArgs({ version, commit, unsigned, out: join(outDir, signedApkName(version)) });
|
||||
const run = spawnSync(exe, args, { stdio: 'inherit' });
|
||||
if (run.error) throw run.error;
|
||||
process.exit(run.status ?? 1);
|
||||
} catch (e) {
|
||||
console.error(`sign:apk: ${e instanceof Error ? e.message : String(e)}`);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user