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

Makefile,version,cmd/operator-sdk/version: add git compile-time variables #1431

Merged
merged 2 commits into from
May 17, 2019

Conversation

joelanford
Copy link
Member

Description of the change:

  • Adds version.GitVersion and version.GitCommit
  • Updates operator-sdk version command to print them
  • Updates Makefile to set them at compile-time.

Motivation for the change:
Many users seem to be using non-release versions of operator-sdk, so lots of issues typically only report the version as something like v0.7.0+git.

To make it easier to troubleshoot issues, it would be nice to have the operator-sdk version command print the git version and commit strings.

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 15, 2019
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

on green tests

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2019
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 15, 2019
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 15, 2019
Copy link
Contributor

@hasbro17 hasbro17 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for this, it will be a lot easier indeed to debug things.

lgtm

@joelanford joelanford merged commit a826ef8 into operator-framework:master May 17, 2019
@joelanford joelanford deleted the git-version-vars branch May 17, 2019 17:37
shawn-hurley pushed a commit to shawn-hurley/operator-sdk that referenced this pull request May 21, 2019
…bles (operator-framework#1431)

* Makefile,version,cmd/operator-sdk/version: add compile-time variables for git version and commit

* release.sh: new format for Version in version.go
shawn-hurley pushed a commit to shawn-hurley/operator-sdk that referenced this pull request May 21, 2019
…bles (operator-framework#1431)

* Makefile,version,cmd/operator-sdk/version: add compile-time variables for git version and commit

* release.sh: new format for Version in version.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants