From 275a535d0b9e83785467b2abed56eaed011cb917 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Thu, 11 Feb 2021 12:22:35 -0500 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20app=20version?= =?UTF-8?q?=20and=20commit=20and=20tweak=20dialog=20whitespace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/desktop/electron-app/config/forge.config.js | 11 ++++++++++- ui/desktop/electron-app/src/boundary-cli.js | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ui/desktop/electron-app/config/forge.config.js b/ui/desktop/electron-app/config/forge.config.js index 612c4d733..aab636b03 100644 --- a/ui/desktop/electron-app/config/forge.config.js +++ b/ui/desktop/electron-app/config/forge.config.js @@ -3,6 +3,15 @@ const { version } = require('../src/boundary-cli.js'); const formattedCLIVersion = version().formatted; +const appVersion = process.env.VERSION + ? `Version: ${process.env.VERSION}\n` + : ''; +const appCommit = process.env.COMMIT + ? `Commit: ${process.env.COMMIT}\n` + : ''; + +const formattedAppVersion = `${appVersion}${appCommit}`; + module.exports = { hooks: { prePackage: () => { @@ -19,7 +28,7 @@ module.exports = { name: "Boundary Desktop", appBundleId: "com.electron.boundary", // TODO: where should the client version number come from? - appVersion: `1.0.0 ${formattedCLIVersion}`, + appVersion: `${formattedAppVersion}${formattedCLIVersion}\n`, appCopyright: "Copyright © 2021 HashiCorp, Inc.", icon: "./config/macos/icon.icns", osxSign: { diff --git a/ui/desktop/electron-app/src/boundary-cli.js b/ui/desktop/electron-app/src/boundary-cli.js index 241f288fc..36797d023 100644 --- a/ui/desktop/electron-app/src/boundary-cli.js +++ b/ui/desktop/electron-app/src/boundary-cli.js @@ -49,8 +49,8 @@ module.exports = { if (gitRevision) gitRevision = gitRevision.groups.rev; if (versionNumber) versionNumber = versionNumber.groups.ver; const formatted = versionNumber - ? `CLI Version ${versionNumber}; CLI Git Rev ${gitRevision}` - : `CLI Git Rev ${gitRevision}`; + ? `CLI Version: ${versionNumber}\nCLI Commit ${gitRevision}` + : `CLI Commit: ${gitRevision}`; return { gitRevision, versionNumber, formatted }; return rawOutput; } From b26a9b8fade670868a2d1ff993c25718ecbf8b65 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Thu, 11 Feb 2021 12:24:22 -0500 Subject: [PATCH 2/2] use consistent colons --- ui/desktop/electron-app/src/boundary-cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/desktop/electron-app/src/boundary-cli.js b/ui/desktop/electron-app/src/boundary-cli.js index 36797d023..2227687ed 100644 --- a/ui/desktop/electron-app/src/boundary-cli.js +++ b/ui/desktop/electron-app/src/boundary-cli.js @@ -49,7 +49,7 @@ module.exports = { if (gitRevision) gitRevision = gitRevision.groups.rev; if (versionNumber) versionNumber = versionNumber.groups.ver; const formatted = versionNumber - ? `CLI Version: ${versionNumber}\nCLI Commit ${gitRevision}` + ? `CLI Version: ${versionNumber}\nCLI Commit: ${gitRevision}` : `CLI Commit: ${gitRevision}`; return { gitRevision, versionNumber, formatted }; return rawOutput;