From 6e79a2a133958857c9c17eb6b293118da5fc01d7 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Fri, 15 Aug 2025 14:12:08 -0700 Subject: [PATCH] Delete development environment variables for the appUpdater (#2961) --- ui/desktop/README.md | 5 +--- .../electron-app/src/helpers/app-updater.js | 25 ++----------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/ui/desktop/README.md b/ui/desktop/README.md index 5d3aee946..d67714d55 100644 --- a/ui/desktop/README.md +++ b/ui/desktop/README.md @@ -96,9 +96,6 @@ These environment variables may be used to customized the build. | Variable | Description | | -------- | ----------- | | `DEBUG_APP_UPDATER` | Enable to debug app updater feature. Must be enabled for all `APP_UPDATER_*` variables to be used. | -| `APP_UPDATER_CURRENT_VERSION` | Version of client. | -| `APP_UPDATER_LATEST_VERSION_TAG` | Next version for comparison with current version. | -| `APP_UPDATER_LATEST_VERSION_LOCATION` | Location of app release to use for updating client. Can be a filepath or url. | | `SETUP_CLI` | Enable download and extraction of CLI. | | `BYPASS_APP_UPDATER` | Disable app updater feature. For development use only. | | `DISABLE_WINDOW_CHROME` | Disable window chrome. For internal use only. | @@ -107,7 +104,7 @@ These environment variables may be used to customized the build. ### Building for Production Before executing a build, be sure to set any environment variables necessary -for your target [environment](#environment-variables-prod) and you have full permissions in the environment you want to build in. +for your target [environment](#environment-variables-prod) and you have full permissions in the environment you want to build in. To build this UI for production, run the following commands from this folder: ```bash diff --git a/ui/desktop/electron-app/src/helpers/app-updater.js b/ui/desktop/electron-app/src/helpers/app-updater.js index ae0133b94..c66c11cfc 100644 --- a/ui/desktop/electron-app/src/helpers/app-updater.js +++ b/ui/desktop/electron-app/src/helpers/app-updater.js @@ -14,14 +14,10 @@ const config = require('../../config/config.js'); const log = require('electron-log/main'); const boundaryCli = require('../cli/index.js'); -let currentVersion = config.releaseVersion; +const currentVersion = config.releaseVersion; const debug = process.env.DEBUG_APP_UPDATER; const releasesUrl = 'https://releases.hashicorp.com/boundary-desktop/'; -if (!app.isPackaged && debug && process.env.APP_UPDATER_CURRENT_VERSION) { - currentVersion = process.env.APP_UPDATER_CURRENT_VERSION; -} - // Returns the real CPU architecture of the machine. const returnArchitectureToUpdate = () => { const nodeArchitecture = process.arch; @@ -177,12 +173,7 @@ module.exports = { */ if (!boundaryCli.isBuiltInCli) return; - let latestVersion; - if (!app.isPackaged && debug) { - latestVersion = process.env.APP_UPDATER_LATEST_VERSION_TAG; - } else { - latestVersion = await findLatestVersion(releasesUrl); - } + const latestVersion = await findLatestVersion(releasesUrl); // Ensure version is in proper format if (!semver.valid(latestVersion)) { @@ -198,18 +189,6 @@ module.exports = { return; } - if (!app.isPackaged) { - const location = process.env.APP_UPDATER_LATEST_VERSION_LOCATION; - if (debug && location) { - // Support hosted url and file paths - displayDownloadPrompt( - latestVersion, - location.match(/^http/i) ? location : `file://${location}`, - ); - return; - } - } - /** * Find archive for update and prompt user when it's available. * Ignore otherwise.