Skip to content
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

Add debug logs for ./gradlew printVersion #717

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

ash211
Copy link
Contributor

@ash211 ash211 commented Jun 2, 2023

Before this PR

In #65 (comment) 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==

@changelog-app
Copy link

changelog-app bot commented Jun 2, 2023

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Add debug logs for ./gradlew printVersion

Check the box to generate changelog(s)

  • Generate changelog entry

@ash211 ash211 requested a review from pkoenig10 June 2, 2023 17:38
@pkoenig10
Copy link
Member

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.

@ash211
Copy link
Contributor Author

ash211 commented Jun 2, 2023

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.

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.

None yet

3 participants