Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update npm dependencies and JFrog CLI default version to 2.43.1 #108

Merged
merged 6 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update cli
  • Loading branch information
sverdlov93 committed Jul 19, 2023
commit bd3e288bb060216a96fccbb9486952817ac8a6c4
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: "JFrog"
inputs:
version:
description: "JFrog CLI Version"
default: "2.37.0"
default: "2.43.1"
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
required: false
download-repository:
description: "Remote repository in Artifactory pointing to 'https://releases.jfrog.io/artifactory/jfrog-cli'. Use this parameter in case you don't have an Internet access."
Expand Down
28 changes: 14 additions & 14 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ exports.Utils = void 0;
const core = __importStar(require("@actions/core"));
const exec_1 = require("@actions/exec");
const toolCache = __importStar(require("@actions/tool-cache"));
const fs = __importStar(require("fs"));
const os = __importStar(require("os"));
const path = __importStar(require("path"));
const semver = __importStar(require("semver"));
const fs_1 = require("fs");
const os_1 = require("os");
const path_1 = require("path");
const semver_1 = require("semver");
class Utils {
static addCliToPath() {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -50,7 +50,7 @@ class Utils {
version = Utils.LATEST_RELEASE_VERSION;
major = '2';
}
else if (semver.lt(version, this.MIN_CLI_VERSION)) {
else if ((0, semver_1.lt)(version, this.MIN_CLI_VERSION)) {
throw new Error('Requested to download JFrog CLI version ' + version + ' but must be at least ' + this.MIN_CLI_VERSION);
}
let jfFileName = Utils.getJfExecutableName();
Expand Down Expand Up @@ -100,7 +100,7 @@ class Utils {
return __awaiter(this, void 0, void 0, function* () {
let cliDir = yield toolCache.cacheFile(downloadDir, fileName, fileName, version);
if (!Utils.isWindows()) {
fs.chmodSync(path.join(cliDir, fileName), 0o555);
(0, fs_1.chmodSync)((0, path_1.join)(cliDir, fileName), 0o555);
}
core.addPath(cliDir);
});
Expand Down Expand Up @@ -140,7 +140,7 @@ class Utils {
let password = process.env.JF_PASSWORD;
let accessToken = process.env.JF_ACCESS_TOKEN;
if (url) {
let configCmd = [Utils.SETUP_JFROG_CLI_SERVER_ID, '--url', url];
let configCmd = [Utils.SETUP_JFROG_CLI_SERVER_ID, '--url', url, '--interactive=false', '--overwrite=true'];
if (accessToken) {
configCmd.push('--access-token', accessToken);
}
Expand Down Expand Up @@ -203,13 +203,13 @@ class Utils {
if (Utils.isWindows()) {
return 'windows-amd64';
}
if (os.platform().includes('darwin')) {
return os.arch() === 'arm64' ? 'mac-arm64' : 'mac-386';
if ((0, os_1.platform)().includes('darwin')) {
return (0, os_1.arch)() === 'arm64' ? 'mac-arm64' : 'mac-386';
}
if (os.arch().includes('arm')) {
return os.arch().includes('64') ? 'linux-arm64' : 'linux-arm';
if ((0, os_1.arch)().includes('arm')) {
return (0, os_1.arch)().includes('64') ? 'linux-arm64' : 'linux-arm';
}
return os.arch().includes('64') ? 'linux-amd64' : 'linux-386';
return (0, os_1.arch)().includes('64') ? 'linux-amd64' : 'linux-386';
}
static getJfExecutableName() {
return Utils.isWindows() ? 'jf.exe' : 'jf';
Expand All @@ -218,7 +218,7 @@ class Utils {
return Utils.isWindows() ? 'jfrog.exe' : 'jfrog';
}
static isWindows() {
return os.platform().startsWith('win');
return (0, os_1.platform)().startsWith('win');
}
/**
* Execute JFrog CLI command.
Expand Down Expand Up @@ -289,7 +289,7 @@ class Utils {
if (version === this.LATEST_CLI_VERSION) {
return false;
}
return semver.lt(version, this.NEW_CONFIG_CLI_VERSION);
return (0, semver_1.lt)(version, this.NEW_CONFIG_CLI_VERSION);
}
}
exports.Utils = Utils;
Expand Down
6 changes: 3 additions & 3 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 70 additions & 1 deletion node_modules/semver/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions node_modules/semver/bin/semver.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 39 additions & 34 deletions node_modules/semver/classes/comparator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading