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 -version flag to dicomutil #149

Merged
merged 1 commit into from
Dec 14, 2020
Merged

Conversation

favadi
Copy link
Contributor

@favadi favadi commented Dec 7, 2020

The version string will be injected at release step with the output of git describe --tags --always.

Fix #83.

When being built from a tag, the output looks like:

dicomutil -version
dicomutil: v1.0.1

In a non-tag commit, it looks like:

dicomutil -version
dicomutil: v1.0.0-1-g9dd5ab9

In above output:

  • 1 is the number of additional commits since v1.0.0
  • g9dd5ab9 is the short git commit hash

The version string is generated by git describe command.

Copy link
Owner

@suyashkumar suyashkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, thank you for helping out with this! Had one minor comment.

cmd/dicomutil/main.go Outdated Show resolved Hide resolved
@suyashkumar suyashkumar self-assigned this Dec 8, 2020
@suyashkumar suyashkumar added the enhancement New feature or request label Dec 8, 2020
Copy link
Owner

@suyashkumar suyashkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I think there's one change needed for this to work. Thanks again for the contribution!

Makefile Outdated Show resolved Hide resolved
The version string will be injected at release step with the output of `git describe --tags --always`.
Copy link
Owner

@suyashkumar suyashkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, LGTM!

@suyashkumar suyashkumar merged commit 3f4e47f into suyashkumar:main Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unique Version String Feature
2 participants