From f2e07c735c014bcae4fb895bd89e739a4d295839 Mon Sep 17 00:00:00 2001 From: Ricardo Maraschini Date: Tue, 16 Jan 2024 12:48:30 +0100 Subject: [PATCH] feat: save release files to output directory (#271) better than keeping them in the root of the project. --- .gitignore | 2 -- Makefile | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index a62e950e7..a34226a0e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,3 @@ bundle pkg/goods/bins pkg/goods/images *tgz -release.tar.gz -release.o diff --git a/Makefile b/Makefile index a0054e8d7..998889fc3 100644 --- a/Makefile +++ b/Makefile @@ -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