element-desktop/scripts/get-version.ts

26 lines
499 B
TypeScript
Raw Normal View History

#!/usr/bin/env -S npx tsx
2023-05-09 11:35:54 +02:00
/*
* Checks for the presence of a webapp, inspects its version and prints it
*/
import { versionFromAsar } from "./set-version.js";
2023-05-09 11:35:54 +02:00
async function main(): Promise<number> {
const version = await versionFromAsar();
console.log(version);
return 0;
}
if (require.main === module) {
main()
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}