mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
[yarn] Allow overriding the revision for the regen-version script
This commit is contained in:
parent
57b966d7c0
commit
780cfcaa4d
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@ const exec = require("execa");
|
||||||
|
|
||||||
const match = json['version'].match(/^[\d.]*(?:-pre\d+|)?/);
|
const match = json['version'].match(/^[\d.]*(?:-pre\d+|)?/);
|
||||||
const version = match ? `${match[0]}-dev` : "dev";
|
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}`;
|
json['version'] = `${version}-${revision}`;
|
||||||
console.log(json['version']);
|
console.log(json['version']);
|
||||||
|
|
Loading…
Reference in a new issue