Add flag for reading binary version
A pull request for this has already been merged.
- #78 by @airycanon — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Start at the crd-ref-docs CLI entry point and review the Makefile example alongside the version lookup in tools/go.mod. Add the --version behavior so the command reports the version expected by the grep check, then verify the command and install/version comparison flow.
Written by the indexing model from the issue text.
Description
It would be nice to be able to get the version of the binary through a flag eg. crd-ref-docs --version. We rely on doing this in order to ensure that our team uses the right versions of binaries. We would like to be able to do something like this in our Makefile:
CRD_REF_DOCS ?= $(TOOLSBIN)/crd-ref-docs
CRD_REF_DOCS_GO_MOD_VERSION ?= $(shell cat tools/go.mod | grep -E "github.com/elastic/crd-ref-docs" | cut -d ' ' -f2)
.PHONY: crd-ref-docs
crd-ref-docs: ## 📦 Download crd-ref-docs locally if necessary.
(test -s $(CRD_REF_DOCS) && \
$(CRD_REF_DOCS) --version | grep $(CRD_REF_DOCS_GO_MOD_VERSION)) || \
(cd tools && GOBIN=$(TOOLSBIN) go install github.com/elastic/crd-ref-docs)
This make target will download the binary and install it in ./tools/bin if it doesn't exist or the version doesn't match what we have in the go module in ./tools/go.mod.
- Dominant language
- Go
- Stars
- 174
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/crd-ref-docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
elastic/crd-ref-docs#204 ·
-
Support for +kubebuilder:validation:Required and omitemptyPossibly taken @swathinsankaran claimed this 110 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
elastic/crd-ref-docs#198 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
elastic/crd-ref-docs#191 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
elastic/crd-ref-docs#188 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
elastic/crd-ref-docs#182 ·
All issues in elastic/crd-ref-docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openimsdk/openim-sdk-core#1127 ·
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Hochfrequenz/aibap.mcp#578 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
mvanhorn/cli-printing-press#4980 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lenaxia/LLMSafeSpaces#1644 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
automation code-quality cookie documentation improvement quick-win task-mining
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/gh-aw#67262 · 2 comments ·
Maintainers usually reply within 1 day