Skip to content

Commit

Permalink
feat: save release files to output directory (#271)
Browse files Browse the repository at this point in the history
better than keeping them in the root of the project.
  • Loading branch information
ricardomaraschini authored Jan 16, 2024
1 parent dfc6d15 commit f2e07c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ bundle
pkg/goods/bins
pkg/goods/images
*tgz
release.tar.gz
release.o
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ pkg/goods/bins/embedded-cluster/kubectl-preflight:
tar -xzf output/tmp/preflight/preflight.tar.gz -C output/tmp/preflight
mv output/tmp/preflight/preflight pkg/goods/bins/embedded-cluster/kubectl-preflight

release.tar.gz:
output/tmp/release.tar.gz:
mkdir -p output/tmp
tar -czf release.tar.gz -C e2e/kots-release .
tar -czf output/tmp/release.tar.gz -C e2e/kots-release .

.PHONY: embedded-release
embedded-release: embedded-cluster-linux-amd64 release.tar.gz
objcopy --input-target binary --output-target binary --rename-section .data=sec_bundle release.tar.gz release.o
@if ! objcopy --update-section sec_bundle=release.o output/bin/embedded-cluster ; then \
objcopy --add-section sec_bundle=release.o output/bin/embedded-cluster ; \
embedded-release: embedded-cluster-linux-amd64 output/tmp/release.tar.gz
objcopy --input-target binary --output-target binary --rename-section .data=sec_bundle output/tmp/release.tar.gz output/tmp/release.o
@if ! objcopy --update-section sec_bundle=output/tmp/release.o output/bin/embedded-cluster 2>/dev/null; then \
objcopy --add-section sec_bundle=output/tmp/release.o output/bin/embedded-cluster ; \
fi

.PHONY: static
Expand Down

0 comments on commit f2e07c7

Please sign in to comment.