mirror of
https://gitea.com/actions/setup-java.git
synced 2025-04-05 23:09:37 +00:00
Added .tool-versions file support (#606)
* added support for tool version file * testing with one regex * working regex * Checked for the file extension * added e2e checks for tool version * removed error warning * updated regex to support early version * updated regex for early version support * updated regex for early version * updated regex to accept early versions * added coreinfo to analyze * updated the regex * updated regex * new regex for early version * updated regex to match the new version file format * new regex * changed the regex * redex updated * used java version regex * regex updated * regex modified * regex updated * regex updated * regex updated * updated regex to support early versions * Regex updated to support all java versions * Documentation updated to add tool version description * Documentation updated for the tool version file * update the advanced doc and readme file to specify tool version changes
This commit is contained in:
24
.github/workflows/e2e-versions.yml
vendored
24
.github/workflows/e2e-versions.yml
vendored
@ -288,19 +288,23 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
distribution: ['temurin', 'microsoft', 'corretto']
|
||||
java-version-file: ['.java-version', '.tool-versions']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create .java-version file
|
||||
shell: bash
|
||||
run: echo "8" > .java-version
|
||||
- name: Create .tool-versions file
|
||||
shell: bash
|
||||
run: echo "java 8" > .tool-versions
|
||||
- name: setup-java
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: ${{ matrix.distribution }}
|
||||
java-version: 11
|
||||
java-version-file: '.java-version'
|
||||
java-version-file: ${{matrix.java-version-file }}
|
||||
- name: Verify Java
|
||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
@ -313,18 +317,22 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
|
||||
java-version-file: ['.java-version', '.tool-versions']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create .java-version file
|
||||
shell: bash
|
||||
run: echo "11" > .java-version
|
||||
- name: Create .tool-versions file
|
||||
shell: bash
|
||||
run: echo "java 11" > .tool-versions
|
||||
- name: setup-java
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: ${{ matrix.distribution }}
|
||||
java-version-file: '.java-version'
|
||||
java-version-file: ${{matrix.java-version-file }}
|
||||
- name: Verify Java
|
||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
@ -337,18 +345,22 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
distribution: ['adopt', 'adopt-openj9', 'zulu']
|
||||
java-version-file: ['.java-version', '.tool-versions']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create .java-version file
|
||||
shell: bash
|
||||
run: echo "11.0.2" > .java-version
|
||||
- name: Create .tool-versions file
|
||||
shell: bash
|
||||
run: echo "java 11.0.2" > .tool-versions
|
||||
- name: setup-java
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: ${{ matrix.distribution }}
|
||||
java-version-file: '.java-version'
|
||||
java-version-file: ${{matrix.java-version-file }}
|
||||
- name: Verify Java
|
||||
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
@ -361,18 +373,22 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
distribution: ['adopt', 'zulu', 'liberica']
|
||||
java-version-file: ['.java-version', '.tool-versions']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create .java-version file
|
||||
shell: bash
|
||||
run: echo "openjdk64-11.0.2" > .java-version
|
||||
- name: Create .tool-versions file
|
||||
shell: bash
|
||||
run: echo "java openjdk64-11.0.2" > .tool-versions
|
||||
- name: setup-java
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: ${{ matrix.distribution }}
|
||||
java-version-file: '.java-version'
|
||||
java-version-file: ${{matrix.java-version-file }}
|
||||
- name: Verify Java
|
||||
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
|
Reference in New Issue
Block a user