mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[yarn] Allow overriding the revision for the regen-version script
This commit is contained in:
parent
57b966d7c0
commit
780cfcaa4d
@ -8,7 +8,9 @@ const exec = require("execa");
|
||||
|
||||
const match = json['version'].match(/^[\d.]*(?:-pre\d+|)?/);
|
||||
const version = match ? `${match[0]}-dev` : "dev";
|
||||
const { stdout: revision } = await exec("git", ["rev-parse", "--short", "HEAD"]);;
|
||||
const revision = process.argv.length > 2
|
||||
? process.argv[2]
|
||||
: (await exec("git", ["rev-parse", "--short", "HEAD"])).stdout;
|
||||
|
||||
json['version'] = `${version}-${revision}`;
|
||||
console.log(json['version']);
|
||||
|
Loading…
Reference in New Issue
Block a user