chore(release): bundle Auth Tools 0.3.2 in Toolbox 0.20.6
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-10-04 12:17:00 +02:00
parent 673960a5cf
commit 68a7bcf89f
13 changed files with 153 additions and 105 deletions
+22 -7
View File
@@ -87,7 +87,9 @@ async function sha256ForPath(filePath) {
async function computeRemoteSha256(url) {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`Unable to download artifact (${response.status} ${response.statusText}).`);
throw new Error(
`Unable to download artifact (${response.status} ${response.statusText}).`
);
}
if (!response.body) {
@@ -132,7 +134,9 @@ function command(cwd) {
child.on('exit', (code) =>
code === 0
? resolve(undefined)
: reject(new Error(`${name} ${args.join(' ')} failed with code ${code}`))
: reject(
new Error(`${name} ${args.join(' ')} failed with code ${code}`)
)
);
});
}
@@ -150,7 +154,9 @@ async function run() {
${usage()}`);
}
if (!SEMVER.test(options.releaseVersion)) {
throw new Error(`--release-version must be semver: ${options.releaseVersion}`);
throw new Error(
`--release-version must be semver: ${options.releaseVersion}`
);
}
if (!SEMVER.test(options.appVersion)) {
throw new Error(`--app-version must be semver: ${options.appVersion}`);
@@ -160,7 +166,8 @@ ${usage()}`);
const lockDir = path.dirname(lockPath);
const lockJson = JSON.parse(await readFile(lockPath, 'utf8'));
const lock = parseReleaseLock(lockJson);
const nextReleaseVersion = options.releaseVersion ?? bumpPatch(lock.releaseVersion);
const nextReleaseVersion =
options.releaseVersion ?? bumpPatch(lock.releaseVersion);
if (!SEMVER.test(nextReleaseVersion)) {
throw new Error(`Invalid release version: ${nextReleaseVersion}`);
}
@@ -199,13 +206,17 @@ ${usage()}`);
};
if (options.portalVersion) {
if (!SEMVER.test(options.portalVersion))
throw new Error(`--portal-version must be semver: ${options.portalVersion}`);
throw new Error(
`--portal-version must be semver: ${options.portalVersion}`
);
nextLock.portalVersion = options.portalVersion;
}
parseReleaseLock(nextLock);
await writeFile(lockPath, `${JSON.stringify(nextLock, null, 2)}\n`, 'utf8');
console.log(`Updated ${path.relative(process.cwd(), lockPath)} (${options.appId})`);
console.log(
`Updated ${path.relative(process.cwd(), lockPath)} (${options.appId})`
);
if (!options.assemble) return;
const runCommand = command(process.cwd());
@@ -229,7 +240,11 @@ ${usage()}`);
console.log(`Assembled release -> ${archive}`);
const releaseChecksum = `${archive}.sha256`;
const releaseSha256 = await sha256ForPath(archive);
await writeFile(releaseChecksum, `${releaseSha256} ${path.basename(archive)}\n`, 'utf8');
await writeFile(
releaseChecksum,
`${releaseSha256} ${path.basename(archive)}\n`,
'utf8'
);
console.log(`Assembled release checksum: ${releaseSha256}`);
}