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

Also support version on go install #87

Merged
merged 2 commits into from
Jul 25, 2024
Merged

Conversation

thbkrkr
Copy link
Contributor

@thbkrkr thbkrkr commented Jul 25, 2024

This makes the version command also works when the binary is installed using go install.

Follow-up of #78 and #84.

@thbkrkr thbkrkr added the enhancement New feature or request label Jul 25, 2024
main.go Outdated Show resolved Hide resolved
@thbkrkr thbkrkr force-pushed the support-version-go-install branch from 7ad167d to a7eeb94 Compare July 25, 2024 10:52
@thbkrkr
Copy link
Contributor Author

thbkrkr commented Jul 25, 2024

Testing:

go install from local sources.

> go install .

/u/k/d/s/g/e/crd-ref-docs support-version-go-install * krkr@fun
> crd-ref-docs -v
Version: (devel)
GitCommit: b78ab371d7dc70c27133eb266576f7021166eb5a
BuildDate: 2024-07-25T10:52:35Z

go install from github.com. I'm surprised that the GitCommit and BuildDate are empty here.

> go install github.com/elastic/[email protected]
go: downloading github.com/elastic/crd-ref-docs v0.0.13-bc6

> crd-ref-docs -v
Version: v0.0.13-bc6
GitCommit: (unknown)
BuildDate: (unknown)

Downloading released binary.

> wget https://github.com/elastic/crd-ref-docs/releases/download/v0.0.13-bc6/crd-ref-docs_0.0.13-bc6_Darwin_arm64.tar.gz
> tar xvzf crd-ref-docs_0.0.13-bc6_Darwin_arm64.tar.gz
> ./crd-ref-docs -v
Version: v0.0.13-bc6
GitCommit: b78ab37
BuildDate: 2024-07-25T10:53:42Z

Copy link
Contributor

@barkbay barkbay left a comment

Choose a reason for hiding this comment

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

lgtm

@thbkrkr thbkrkr merged commit 0ad85c5 into master Jul 25, 2024
4 checks passed
@thbkrkr thbkrkr mentioned this pull request Jul 25, 2024
@thbkrkr thbkrkr deleted the support-version-go-install branch July 25, 2024 12:00
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.

2 participants