taskmanager/scripts/release-version.mjs
Weapie 2bf0a0dd4c
All checks were successful
check / verify (push) Successful in 2m58s
check / publish (push) Successful in 2m51s
Publish versioned Docker images to Gitea after container-network CI checks
2026-10-07 10:44:34 +02:00

8 lines
413 B
JavaScript

import { readFileSync } from "node:fs";
const version = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
const ref = process.env.RELEASE_REF;
if (!/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(version) || ref !== `refs/tags/v${version}`) {
throw new Error("Release tag must be vX.Y.Z and match the stable version in package.json");
}
console.log(`version=${version}`);