gradle-git-version
gradle-git-version copied to clipboard
Add debug logs for ./gradlew printVersion
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==
Generate changelog in changelog/@unreleased
changelog/@unreleasedType
- [ ] Feature
- [x] Improvement
- [ ] Fix
- [ ] Break
- [ ] Deprecation
- [ ] Manual task
- [ ] Migration
Description
Check the box to generate changelog(s)
- [x] Generate changelog entry
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.
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.
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.