Delete development environment variables for the appUpdater (#2961)
This commit is contained in:
1 parent
088deaed3a
commit
6e79a2a133
2 files changed
+3
-27
No files matched your search
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user