@watchtowerobservability/cli 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +3 -1
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -13,7 +13,9 @@ async function get(url) {
|
|
|
13
13
|
const name = assetName(process.platform, process.arch);
|
|
14
14
|
if (!name) throw new Error(`unsupported platform ${process.platform}/${process.arch}`);
|
|
15
15
|
const v = require('./package.json').version;
|
|
16
|
-
|
|
16
|
+
// WTCTL_DOWNLOAD_BASE: a mirror of the GitHub release assets, for runners that only reach npm.
|
|
17
|
+
const root = process.env.WTCTL_DOWNLOAD_BASE || 'https://github.com/watchtowerobservability/watchtower-cli/releases/download';
|
|
18
|
+
const base = `${root.replace(/\/+$/, '')}/v${v}`;
|
|
17
19
|
const [bin, sums] = await Promise.all([get(`${base}/${name}`), get(`${base}/SHA256SUMS`)]);
|
|
18
20
|
verify(bin, sums.toString(), name);
|
|
19
21
|
const dest = path.join(__dirname, 'bin', process.platform === 'win32' ? 'wtctl-bin.exe' : 'wtctl-bin');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@watchtowerobservability/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Watchtower command line client (downloads and verifies the release binary)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "github:watchtowerobservability/watchtower-cli",
|