Skip to content

Reading of the release version and description is configuration cache compatible #406

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

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

tylerbertrand
Copy link
Member

@tylerbertrand tylerbertrand commented Apr 17, 2023

Add release notes to githubRelease body

  • Leverage Provider.fileContents() to support configuration caching when reading release notes file

Use configuration-cache-compatible Provider API to read version file

  • Use configuration-cache-compatible Provider.fileContents() to read version file

Tests

  1. Run ./gradlew clean build and inspect jar versions
gradle-enterprise-build-validation-scripts % find . -name *.jar
./gradle/wrapper/gradle-wrapper.jar
./components/fetch-build-scan-data-cmdline-tool/build/libs/fetch-build-scan-data-cmdline-tool-2.3.6-all.jar
./components/fetch-build-scan-data-cmdline-tool/build/libs/fetch-build-scan-data-cmdline-tool-2.3.6.jar
./components/configure-gradle-enterprise-maven-extension/build/libs/configure-gradle-enterprise-maven-extension-2.3.6.jar
./components/capture-build-scan-url-maven-extension/build/libs/capture-build-scan-url-maven-extension-2.2.2.jar
./buildSrc/build/libs/buildSrc.jar
./build/scripts/maven/lib/maven-libs/configure-gradle-enterprise-maven-extension-2.3.6.jar
./build/scripts/maven/lib/maven-libs/common-custom-user-data-maven-extension-1.11.1.jar
./build/scripts/maven/lib/maven-libs/gradle-enterprise-maven-extension-1.16.6.jar
./build/scripts/maven/lib/export-api-clients/fetch-build-scan-data-cmdline-tool-2.3.6-all.jar
./build/scripts/gradle/lib/export-api-clients/fetch-build-scan-data-cmdline-tool-2.3.6-all.jar
  1. Execute dry run githubRelease
> Task :githubRelease
:githubRelease [This task is a dry run. All API calls that would modify the repo are disabled. API calls that access the repo information are not disabled. Use this to show what actions would be executed.]
:githubRelease [CHECKING FOR PREVIOUS RELEASE]
:githubRelease [CREATING NEW RELEASE 
{
    tag_name               = v2.3.6
    target_commitish       = main
    name                   = 2.3.6
    generate_release_notes = false
    body                   = 
        - [NEW] TBD
    draft                  = false
    prerelease             = false
}]
  1. Modifying version.txt results in a new configuration cache entry being stored, and the dry run githubRelease uses the updated version.
  2. Modifying changes.md does not result in a new configuration cache entry being stored as it is read lazily.
  3. Running with no changes results in the configuration cache entry being re-used.

@tylerbertrand tylerbertrand force-pushed the tylerbertrand/version-provider branch from 9959556 to 7339c3e Compare April 17, 2023 16:39
@tylerbertrand tylerbertrand marked this pull request as ready for review April 17, 2023 16:56
Add release notes to githubRelease body
* Leverage Provider.fileContents() to support configuration caching when reading release notes file

Use configuration-cache-compatible Provider API to read version file
* Use configuration-cache-compatible Provider.fileContents() to read version file
@tylerbertrand tylerbertrand force-pushed the tylerbertrand/version-provider branch from 7339c3e to a5fc9f5 Compare April 17, 2023 17:04
@etiennestuder etiennestuder changed the title Use Provider API to read version and changes files Reading of release version and description is configuration cache compatible Apr 17, 2023
@etiennestuder etiennestuder changed the title Reading of release version and description is configuration cache compatible Reading of the release version and description is configuration cache compatible Apr 17, 2023
@tylerbertrand tylerbertrand merged commit c74a1e5 into main Apr 17, 2023
@tylerbertrand tylerbertrand deleted the tylerbertrand/version-provider branch April 17, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants