From 38a5ab89efccbec4a5827f14c69f5e71c097878f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 Oct 2018 10:05:45 +0200 Subject: [PATCH] optionally sign windows setup fixes #59697 --- build/gulpfile.vscode.win32.js | 7 +++++-- build/tfs/win32/product-build-win32.yml | 2 +- build/win32/code.iss | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index cf25d5ea95158..b73b4f3d346da 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -31,12 +31,15 @@ function packageInnoSetup(iss, options, cb) { options = options || {}; const definitions = options.definitions || {}; - const debug = process.argv.some(arg => arg === '--debug-inno'); - if (debug) { + if (process.argv.some(arg => arg === '--debug-inno')) { definitions['Debug'] = 'true'; } + if (process.argv.some(arg => arg === '--sign')) { + definitions['Sign'] = 'true'; + } + const keys = Object.keys(definitions); keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${key}' in Inno Setup package step`)); diff --git a/build/tfs/win32/product-build-win32.yml b/build/tfs/win32/product-build-win32.yml index 272a22962f87f..0baed97778226 100644 --- a/build/tfs/win32/product-build-win32.yml +++ b/build/tfs/win32/product-build-win32.yml @@ -143,7 +143,7 @@ steps: - powershell: | . build/tfs/win32/exec.ps1 $ErrorActionPreference = "Stop" - exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" } + exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign } $Repo = "$(pwd)" $Root = "$Repo\.." diff --git a/build/win32/code.iss b/build/win32/code.iss index 65e877158ff3d..43572199eb596 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -32,7 +32,10 @@ VersionInfoVersion={#RawVersion} ShowLanguageDialog=auto ArchitecturesAllowed={#ArchitecturesAllowed} ArchitecturesInstallIn64BitMode={#ArchitecturesInstallIn64BitMode} + +#ifdef Sign SignTool=esrp +#endif #if "user" == InstallTarget DefaultDirName={userpf}\{#DirName}