Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ class Utils {
if ((0, os_1.arch)().includes('arm')) {
return (0, os_1.arch)().includes('64') ? 'linux-arm64' : 'linux-arm';
}
if ((0, os_1.arch)().includes('s390x')) {
return 'linux-s390x';
}
return (0, os_1.arch)().includes('64') ? 'linux-amd64' : 'linux-386';
}
static getJfExecutableName() {
Expand Down
3 changes: 3 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ export class Utils {
if (arch().includes('arm')) {
return arch().includes('64') ? 'linux-arm64' : 'linux-arm';
}
if (arch().includes('s390x')) {
return 'linux-s390x';
}
return arch().includes('64') ? 'linux-amd64' : 'linux-386';
}

Expand Down
2 changes: 2 additions & 0 deletions test/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ describe('JFrog CLI V1 URL Tests', () => {
['linux' as NodeJS.Platform, 'arm64', 'jfrog', 'v1/1.2.3/jfrog-cli-linux-arm64/jfrog'],
['linux' as NodeJS.Platform, '386', 'jfrog', 'v1/1.2.3/jfrog-cli-linux-386/jfrog'],
['linux' as NodeJS.Platform, 'arm', 'jfrog', 'v1/1.2.3/jfrog-cli-linux-arm/jfrog'],
['linux' as NodeJS.Platform, 's390x', 'jfrog', 'v1/1.2.3/jfrog-cli-linux-s390x/jfrog'],
];

test.each(cases)('CLI Url for %s-%s', (platform, arch, fileName, expectedUrl) => {
Expand All @@ -242,6 +243,7 @@ describe('JFrog CLI V2 URL Tests', () => {
['linux' as NodeJS.Platform, 'arm64', 'jfrog', 'v2/2.3.4/jfrog-cli-linux-arm64/jfrog'],
['linux' as NodeJS.Platform, '386', 'jfrog', 'v2/2.3.4/jfrog-cli-linux-386/jfrog'],
['linux' as NodeJS.Platform, 'arm', 'jfrog', 'v2/2.3.4/jfrog-cli-linux-arm/jfrog'],
['linux' as NodeJS.Platform, 's390x', 'jfrog', 'v2/2.3.4/jfrog-cli-linux-s390x/jfrog'],
];

test.each(cases)('CLI Url for %s-%s', (platform, arch, fileName, expectedUrl) => {
Expand Down
Loading