From b9684c0cf5181bf0e75eebffdcd530093cd83bdb Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Thu, 24 Jun 2021 15:59:03 -0700 Subject: [PATCH] =?UTF-8?q?Prefer=20=E2=80=98release-candidate=E2=80=99=20?= =?UTF-8?q?instead=20of=20=E2=80=98rc=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the version alias match other places where we reference a release candidate version. The 'rc' alias is still supported, but emits a deprecation warning. --- .github/workflows/prod.yml | 2 +- README.md | 12 ++++++------ src/provision.ts | 5 +++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 006a576..29868e5 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -31,7 +31,7 @@ jobs: - name: Test use Gradle version alias uses: ./ with: - gradle-version: rc + gradle-version: release-candidate build-root-directory: __tests__/samples/no-wrapper arguments: help - name: Test use defined Gradle executable diff --git a/README.md b/README.md index f954ac1..b6edec0 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,11 @@ Moreover, you can use the following aliases: | Alias | Selects | | --- |---| -| `wrapper` | The Gradle wrapper's version (default, useful for matrix builds) | -| `current` | The current [stable release](https://gradle.org/install/) | -| `rc` | The current [release candidate](https://gradle.org/release-candidate/) if any, otherwise fallback to `current` | -| `nightly` | The latest [nightly](https://gradle.org/nightly/), fails if none. | -| `release-nightly` | The latest [release nightly](https://gradle.org/release-nightly/), fails if none. | +| `wrapper` | The Gradle wrapper's version (default, useful for matrix builds) | +| `current` | The current [stable release](https://gradle.org/install/) | +| `release-candidate` | The current [release candidate](https://gradle.org/release-candidate/) if any, otherwise fallback to `current` | +| `nightly` | The latest [nightly](https://gradle.org/nightly/), fails if none. | +| `release-nightly` | The latest [release nightly](https://gradle.org/release-nightly/), fails if none. | This can be handy to, for example, automatically test your build with the next Gradle version once a release candidate is out: @@ -116,7 +116,7 @@ jobs: java-version: 11 - uses: eskatos/gradle-command-action@v1 with: - gradle-version: rc + gradle-version: release-candidate arguments: build --dry-run # just test build configuration ``` diff --git a/src/provision.ts b/src/provision.ts index 0203250..660adf8 100644 --- a/src/provision.ts +++ b/src/provision.ts @@ -19,6 +19,11 @@ export async function gradleVersion(version: string): Promise { case 'current': return gradleCurrent() case 'rc': + core.warning( + `Specifying gradle-version 'rc' has been deprecated. Use 'release-candidate' instead.` + ) + return gradleReleaseCandidate() + case 'release-candidate': return gradleReleaseCandidate() case 'nightly': return gradleNightly()