gradle-git-version icon indicating copy to clipboard operation
gradle-git-version copied to clipboard

Add debug logs for ./gradlew printVersion

Open ash211 opened this issue 2 years ago • 3 comments

Before this PR

In https://github.com/palantir/gradle-git-version/issues/65#issuecomment-1574078590 I as a user was confused about the difference between ./gradlew printVersion and println(gitVersion()). I thought ./gradlew printVersion was printing the version that gradle-git-version produced, and not the version of its gradle project.

One of the things I did while debugging was run with --info | grep -i git and --debug | grep -i git. I think if that had included the logs included in this PR, I would've been able to determine that the problem was a missing version gitVersion() line, and not a bug in my tags or git repo.

After this PR

==COMMIT_MSG== Add debug logs for ./gradlew printVersion ==COMMIT_MSG==

ash211 avatar Jun 02 '23 17:06 ash211

Generate changelog in changelog/@unreleased

Type

  • [ ] Feature
  • [x] Improvement
  • [ ] Fix
  • [ ] Break
  • [ ] Deprecation
  • [ ] Manual task
  • [ ] Migration

Description Add debug logs for ./gradlew printVersion

Check the box to generate changelog(s)

  • [x] Generate changelog entry

changelog-app[bot] avatar Jun 02 '23 17:06 changelog-app[bot]

I thought ./gradlew printVersion was printing the version that gradle-git-version produced, and not the version of its gradle project.

I don't understand the intention of this PR. If you're using this plugin, then these values will be the same.

pkoenig10 avatar Jun 02 '23 18:06 pkoenig10

Using this plugin has two steps:

https://github.com/palantir/gradle-git-version#usage

1:

plugins {
    id 'com.palantir.git-version' version '<current version>'
}

2:

version gitVersion()

This PR is intended to help debug when you've done step 1 but not 2.

ash211 avatar Jun 02 '23 18:06 ash211

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

stale[bot] avatar Jun 27 '25 05:06 stale[bot]