Fixed revision parsing for non branch builds
This commit is contained in:
parent
6aa515fd6e
commit
1c13904e05
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ const generate_definitions = async (target: string) => {
|
|||
const git_rev = fs.readFileSync(path.join(__dirname, ".git", "HEAD")).toString();
|
||||
let version;
|
||||
if(git_rev.indexOf("/") === -1)
|
||||
version = git_rev;
|
||||
version = (git_rev || "0000000").substr(0, 7);
|
||||
else
|
||||
version = fs.readFileSync(path.join(__dirname, ".git", git_rev.substr(5).trim())).toString().substr(0, 7);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue