mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
Support signing Flatpak builds with GPG
This honors the following environment variables: - $GPG_KEY_ID: When set, it can be the identifier, full fingerprint, or email address of a GnuPG key which will be used to sign Flatpak builds. - $GPG_HOMEDIR: Path to an alternative home directory to be used by GnuPG, instead of the default ~/.gnupg directory of the current user. This can be used to point GnuPG to a different keychain.
This commit is contained in:
@@ -217,6 +217,13 @@ function buildFlatpak(arch) {
|
||||
arch: flatpakArch,
|
||||
bundlePath: manifest.appId + '-' + flatpakArch + '.flatpak',
|
||||
};
|
||||
// Setup PGP signing if requested.
|
||||
if (process.env.GPG_KEY_ID !== undefined) {
|
||||
buildOptions.gpgSign = process.env.GPG_KEY_ID;
|
||||
if (process.env.GPG_HOMEDIR) {
|
||||
buildOptions.gpgHomedir = process.env.GPG_HOME_DIR;
|
||||
}
|
||||
}
|
||||
return function (cb) {
|
||||
require('flatpak-bundler').bundle(manifest, buildOptions, cb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user