Skip to content

Commit

Permalink
Fix microsoft#37395 - ignore git output. Also only compute when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Nov 1, 2017
1 parent 06ff8d7 commit 2a5962a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ function computeChecksum(filename) {
return hash;
}

const settingsSearchBuildId = getBuildNumber();
function packageTask(platform, arch, opts) {
opts = opts || {};

Expand Down Expand Up @@ -275,6 +274,7 @@ function packageTask(platform, arch, opts) {
const packageJsonStream = gulp.src(['package.json'], { base: '.' })
.pipe(json({ name, version }));

const settingsSearchBuildId = getBuildNumber();
const date = new Date().toISOString();
const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json({ commit, date, checksums, settingsSearchBuildId }));
Expand Down Expand Up @@ -462,6 +462,7 @@ gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () =
return;
}

const settingsSearchBuildId = getBuildNumber();
if (!settingsSearchBuildId) {
console.error('Failed to compute build number');
return;
Expand Down Expand Up @@ -500,7 +501,7 @@ function getBuildNumber() {
function getPreviousVersion(versionStr) {
function tagExists(tagName) {
try {
cp.execSync(`git rev-parse ${tagName}`);
cp.execSync(`git rev-parse ${tagName}`, { stdio: 'ignore' });
return true;
} catch (e) {
return false;
Expand Down

0 comments on commit 2a5962a

Please sign in to comment.