fix #1670: building without git

vibrancy
antelle 2020-12-30 17:46:16 +01:00
parent 5f5ea892a3
commit 33763ab865
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ module.exports = function (grunt) {
const getCodeSignConfig = () =>
skipSign ? { identities: {} } : require('./keys/codesign.json');
const sha = execSync('git rev-parse --short HEAD').toString('utf8').trim();
const sha = fs.existsSync('.git')
? execSync('git rev-parse --short HEAD').toString('utf8').trim()
: '000';
const webpackOptions = {
date,