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

feat(Makefile): Add checksums and tarballs for crank #5631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tampakrap
Copy link

@tampakrap tampakrap commented Apr 26, 2024

Description of your changes

I have:

Need help with this checklist? See the cheat sheet.

- The checksums will help people to verify that their downloaded binary
  is not corrupted
- The tarballs provide faster downloads, plus they can be useful for
  creating distro and brew packages, see crossplane#4899

Signed-off-by: Theo Chatzimichos <tampakrap@gmail.com>
@tampakrap tampakrap requested a review from a team as a code owner April 26, 2024 08:10
@tampakrap tampakrap requested a review from bobh66 April 26, 2024 08:10
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

awesome to see your continued efforts @tampakrap! a scoping question for you about if this would be useful in other projects too 🤔

@@ -143,6 +143,14 @@ e2e.init: build e2e-tag-images

e2e.run: $(KIND) $(HELM3) e2e-run-tests

build.artifacts.platform: build.artifacts.bundle.platform

build.artifacts.bundle.platform:
Copy link
Member

Choose a reason for hiding this comment

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

what do we think about this being a more generally useful thing in the upbound/build submodule that has common build functionality and can be reused across multiple repos?

https://github.com/upbound/build

Copy link
Author

Choose a reason for hiding this comment

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

Have a look at this diff please https://github.com/upbound/build/compare/master...tampakrap:upbound-build:introduce_build_artifacts_bundle_target?expand=1

Based on the above, the patch for this Makefile becomes the following:

build-artifacts-checksums-tarballs:
	@mkdir -p $(abspath $(OUTPUT_DIR)/bundle/$(PLATFORM))
	@$(SHA256SUM) $(GO_OUT_DIR)/crank$(GO_OUT_EXT) | head -c 64 > $(GO_OUT_DIR)/crank$(GO_OUT_EXT).sha256
	@tar -czvf $(abspath $(OUTPUT_DIR)/bundle/$(PLATFORM)/crank).tar.gz -C $(GO_BIN_DIR) $(PLATFORM)/crank$(GO_OUT_EXT) $(PLATFORM)/crank$(GO_OUT_EXT).sha256
	@$(SHA256SUM) $(OUTPUT_DIR)/bundle/$(PLATFORM)/crank.tar.gz | head -c 64 > $(OUTPUT_DIR)/bundle/$(PLATFORM)/crank.tar.gz.sha256

build.artifacts.bundle.platform: build-artifacts-checksums-tarballs

Let me know what you think so I can proceed with the PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants