Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
673 B
JavaScript
Raw Permalink Normal View History

2026-03-30 17:17:36 +02:00
#!/usr/bin/env node
2023-05-09 10:35:54 +01:00
/*
* Checks for the presence of a webapp, inspects its version and prints it
*/
2024-10-31 09:07:58 +00:00
import url from "node:url";
2026-03-30 17:17:36 +02:00
import { versionFromAsar } from "./set-version.ts";
2023-05-09 10:35:54 +01:00
async function main(): Promise<number> {
const version = await versionFromAsar();
console.log(version);
return 0;
}
2024-10-31 09:07:58 +00:00
if (import.meta.url.startsWith("file:")) {
const modulePath = url.fileURLToPath(import.meta.url);
if (process.argv[1] === modulePath) {
main()
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}
2023-05-09 10:35:54 +01:00
}