Skip to content

Commit

Permalink
Add support for the microsoft distribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Dec 7, 2021
1 parent 3d55049 commit c3cb155
Show file tree
Hide file tree
Showing 7 changed files with 23,990 additions and 26,863 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/e2e-versions.yml
Expand Up @@ -14,7 +14,6 @@ on:
workflow_dispatch:
jobs:
setup-java-major-versions:
if: ${{ matrix.distribution != 'microsoft' || matrix.version != '8' }}
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -23,6 +22,9 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'adopt', 'adopt-openj9', 'zulu', 'liberica', 'microsoft' ] # internally 'adopt-hotspot' is the same as 'adopt'
version: ['8', '11', '16']
exclude:
- distribution: microsoft
version: 8
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -59,7 +59,7 @@ Currently, the following distributions are supported:
| `adopt` or `adopt-hotspot` | Adopt OpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) |
| `adopt-openj9` | Adopt OpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) |
| `liberica` | Liberica JDK | [Link](https://bell-sw.com/) | [Link](https://bell-sw.com/liberica_eula/) |
| `microsoft` | Microsoft OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq)
| `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq)

**NOTE:** The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions.

Expand Down
6 changes: 3 additions & 3 deletions __tests__/distributors/microsoft-installer.test.ts
Expand Up @@ -31,8 +31,8 @@ describe('findPackageForDownload', () => {
])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => {
const result = await distribution['findPackageForDownload'](input);
expect(result.version).toBe(expectedVersion);
var os: string;
var archive: string;
let os: string;
let archive: string;
switch (process.platform) {
case 'darwin':
os = 'macos';
Expand All @@ -53,7 +53,7 @@ describe('findPackageForDownload', () => {

it('should throw an error', async () => {
await expect(distribution['findPackageForDownload']('8')).rejects.toThrow(
/Could not find satisfied version for semver */
/Could not find satisfied version for SemVer */
);
});
});
Expand Down

0 comments on commit c3cb155

Please sign in to comment.