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

IBM Semeru Enhancement on arm64 #677

Merged
merged 9 commits into from
Aug 29, 2024
2 changes: 1 addition & 1 deletion __tests__/distributors/semeru-installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ describe('findPackageForDownload', () => {
});
distribution['getAvailableVersions'] = async () => [];
await expect(distribution['findPackageForDownload']('8')).rejects.toThrow(
`Unsupported architecture for IBM Semeru: ${arch}, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64`
`Unsupported architecture for IBM Semeru: ${arch} for your current OS version, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64`
);
}
);
Expand Down
11 changes: 6 additions & 5 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124939,8 +124939,9 @@ class SemeruDistribution extends base_installer_1.JavaBase {
}
findPackageForDownload(version) {
return __awaiter(this, void 0, void 0, function* () {
if (!supportedArchitectures.includes(this.architecture)) {
throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture}, the following are supported: ${supportedArchitectures.join(', ')}`);
const arch = this.distributionArchitecture();
if (!supportedArchitectures.includes(arch)) {
throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture} for your current OS version, the following are supported: ${supportedArchitectures.join(', ')}`);
}
if (!this.stable) {
throw new Error('IBM Semeru does not provide builds for early access versions');
Expand Down Expand Up @@ -124974,7 +124975,7 @@ class SemeruDistribution extends base_installer_1.JavaBase {
const availableOptionsMessage = availableOptions
? `\nAvailable versions: ${availableOptions}`
: '';
throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`);
throw new Error(`Could not find satisfied version for SemVer version '${version}' for your current OS version for ${this.architecture} architecture ${availableOptionsMessage}`);
}
return resolvedFullVersion;
});
Expand All @@ -124999,7 +125000,7 @@ class SemeruDistribution extends base_installer_1.JavaBase {
getAvailableVersions() {
return __awaiter(this, void 0, void 0, function* () {
const platform = this.getPlatformOption();
const arch = this.architecture;
const arch = this.distributionArchitecture();
const imageType = this.packageType;
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
const releaseType = this.stable ? 'ga' : 'ea';
Expand Down Expand Up @@ -127946,4 +127947,4 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;
;
12 changes: 8 additions & 4 deletions src/distributions/semeru/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ export class SemeruDistribution extends JavaBase {
protected async findPackageForDownload(
version: string
): Promise<JavaDownloadRelease> {
if (!supportedArchitectures.includes(this.architecture)) {
const arch = this.distributionArchitecture();

if (!supportedArchitectures.includes(arch)) {
throw new Error(
`Unsupported architecture for IBM Semeru: ${
this.architecture
}, the following are supported: ${supportedArchitectures.join(', ')}`
} for your current OS version, the following are supported: ${supportedArchitectures.join(
', '
)}`
);
}

Expand Down Expand Up @@ -81,7 +85,7 @@ export class SemeruDistribution extends JavaBase {
? `\nAvailable versions: ${availableOptions}`
: '';
throw new Error(
`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`
`Could not find satisfied version for SemVer version '${version}' for your current OS version for ${this.architecture} architecture ${availableOptionsMessage}`
);
}

Expand Down Expand Up @@ -124,7 +128,7 @@ export class SemeruDistribution extends JavaBase {

public async getAvailableVersions(): Promise<ISemeruAvailableVersions[]> {
const platform = this.getPlatformOption();
const arch = this.architecture;
const arch = this.distributionArchitecture();
const imageType = this.packageType;
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
const releaseType = this.stable ? 'ga' : 'ea';
Expand Down
Loading