jfrog-cli-v2-jf 2.21.4 → 2.23.0
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/init.js +10 -1
- package/package.json +1 -1
package/init.js
CHANGED
|
@@ -60,7 +60,7 @@ function download(url) {
|
|
|
60
60
|
function downloadCli() {
|
|
61
61
|
console.log("Downloading JFrog CLI " + version );
|
|
62
62
|
var startUrl = 'https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/' + version + '/' + pkgName + '/' + fileName;
|
|
63
|
-
// We detect
|
|
63
|
+
// We detect outbound proxy by looking at the environment variable
|
|
64
64
|
if (process.env.https_proxy && process.env.https_proxy.length > 0) {
|
|
65
65
|
downloadWithProxy(startUrl);
|
|
66
66
|
} else {
|
|
@@ -85,17 +85,26 @@ function writeToFile(response) {
|
|
|
85
85
|
if (!process.platform.startsWith("win")) {
|
|
86
86
|
fs.chmodSync(filePath, 0555);
|
|
87
87
|
}
|
|
88
|
+
runCliIntro(filePath)
|
|
88
89
|
}).on('error', function (err) {
|
|
89
90
|
console.error(err);
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
function runCliIntro() {
|
|
95
|
+
const { spawn } = require('child_process');
|
|
96
|
+
spawn(getFileName(), ['intro'], {stdio: 'inherit', shell: true});
|
|
97
|
+
}
|
|
98
|
+
|
|
93
99
|
function getArchitecture() {
|
|
94
100
|
var platform = process.platform;
|
|
95
101
|
if (platform.startsWith("win")) {
|
|
96
102
|
return "windows-amd64";
|
|
97
103
|
}
|
|
98
104
|
if (platform.includes("darwin")) {
|
|
105
|
+
if (process.arch === "arm64") {
|
|
106
|
+
return "mac-arm64"
|
|
107
|
+
}
|
|
99
108
|
return "mac-386";
|
|
100
109
|
}
|
|
101
110
|
if (process.arch.includes("64")) {
|
package/package.json
CHANGED