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

deps: uplift crd-ref-docs to 0.1.0 #1206

Merged

Conversation

zdtsw
Copy link
Member

@zdtsw zdtsw commented Aug 27, 2024

Description

  • their release changed and support different os/arch binary
  • and it is named as x86_64 not amd64 🤫

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

- their release changed and support different os/arch binary

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
@zdtsw zdtsw requested review from ykaliuta and removed request for mattmahoneyrh and ajaypratap003 August 27, 2024 13:48
Makefile Outdated
ARCH=x86_64
else
ARCH=$(strip $(shell go env GOARCH))
endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Their OS and ARCH values are uname -s and uname -m

Copy link
Member Author

Choose a reason for hiding this comment

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

i rewrite this whole shabnag

Makefile Outdated
test -s $(CRD_REF_DOCS) || curl -sSLo $(CRD_REF_DOCS) $(CRD_REF_DOCS_DL_URL) && \
chmod +x $(CRD_REF_DOCS) ;\
test -s $(CRD_REF_DOCS) || ( \
OS=$(shell go env GOOS) && \
Copy link
Contributor

Choose a reason for hiding this comment

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

why not make variable?

Makefile Outdated
OS=$(shell go env GOOS) && \
wget -q -O $(LOCALBIN)/$(CRD_REF_DOCS_TARBALL) https://github.com/elastic/crd-ref-docs/releases/download/v$(CRD_REF_DOCS_VERSION)/crd-ref-docs_$(CRD_REF_DOCS_VERSION)_$${OS}_${ARCH}.tar.gz && \
tar -xzf $(LOCALBIN)/$(CRD_REF_DOCS_TARBALL) -C $(LOCALBIN) && \
rm -rf $(LOCALBIN)/$(CRD_REF_DOCS_TARBALL) $(LOCALBIN)/LICENSE $(LOCALBIN)/README.md && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use something like
curl -sSL <tarball url> | tar -zxf - -C $(LOCALBIN) crd-ref-docs

Makefile Outdated
chmod +x $(CRD_REF_DOCS) ;\
test -s $(CRD_REF_DOCS) || ( \
OS=$(shell go env GOOS) && \
wget -q -O $(LOCALBIN)/$(CRD_REF_DOCS_TARBALL) https://github.com/elastic/crd-ref-docs/releases/download/v$(CRD_REF_DOCS_VERSION)/crd-ref-docs_$(CRD_REF_DOCS_VERSION)_$${OS}_${ARCH}.tar.gz && \
Copy link
Contributor

Choose a reason for hiding this comment

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

$() for make variables please

@ykaliuta
Copy link
Contributor

amd64 is a legacy name from the times when Intel did not support it and promoted their VLIW IA64. Debian keeps it the same for the same reasons. But nowadays name is x86_64.

Makefile Outdated
chmod +x $(CRD_REF_DOCS) ;\
test -s $(CRD_REF_DOCS) || ( \
curl -sSL https://github.com/elastic/crd-ref-docs/releases/download/v$(CRD_REF_DOCS_VERSION)/crd-ref-docs_$(CRD_REF_DOCS_VERSION)_$(shell uname -s)_$(shell uname -m).tar.gz | tar -xzf - -C $(LOCALBIN) && \
rm -rf $(LOCALBIN)/LICENSE $(LOCALBIN)/README.md && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put filename to tar to extract (as in my example), then you do not need to rm anything.

Makefile Outdated
test -s $(CRD_REF_DOCS) || curl -sSLo $(CRD_REF_DOCS) $(CRD_REF_DOCS_DL_URL) && \
chmod +x $(CRD_REF_DOCS) ;\
test -s $(CRD_REF_DOCS) || ( \
curl -sSL https://github.com/elastic/crd-ref-docs/releases/download/v$(CRD_REF_DOCS_VERSION)/crd-ref-docs_$(CRD_REF_DOCS_VERSION)_$(shell uname -s)_$(shell uname -m).tar.gz | tar -xzf - -C $(LOCALBIN) && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not have strong opinion, usually I would put that in variables, then the names are self descriptive. But this will work as well.

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Copy link

openshift-ci bot commented Aug 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ykaliuta

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 3ce4d58 into opendatahub-io:incubation Aug 27, 2024
8 checks passed
zdtsw referenced this pull request in zdtsw-forking/rhods-operator Aug 29, 2024
* deps: uplift crd-ref-docs to 0.1.0

- their release changed and support different os/arch binary

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: rewrite after review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 3ce4d58)
openshift-merge-bot bot referenced this pull request in red-hat-data-services/rhods-operator Aug 30, 2024
* deps: uplift crd-ref-docs to 0.1.0

- their release changed and support different os/arch binary

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: rewrite after review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 3ce4d58)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Sep 16, 2024
* deps: uplift crd-ref-docs to 0.1.0

- their release changed and support different os/arch binary

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: rewrite after review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 3ce4d58)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Sep 16, 2024
* deps: uplift crd-ref-docs to 0.1.0

- their release changed and support different os/arch binary

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: rewrite after review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 3ce4d58)
openshift-merge-bot bot referenced this pull request in red-hat-data-services/rhods-operator Sep 18, 2024
* deps: uplift crd-ref-docs to 0.1.0

- their release changed and support different os/arch binary

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: rewrite after review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 3ce4d58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants