mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 05:29:07 +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 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 New Issue
Block a user