From 0160248429b94b72d86b66ee32c0ce2f049ae6ea Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Fri, 7 Feb 2025 14:37:29 -0700 Subject: [PATCH] Properly handle writing $(config) files to dist The `cp` operation was copying files to the root of dist, rather than to the proper relative location. Including them in the dist file mainfest lets tar handle this properly. Signed-off-by: Jonathon Anderson --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aa0b5a48..b25ec474 100644 --- a/Makefile +++ b/Makefile @@ -166,9 +166,9 @@ init: dist: $(config) rm -rf .dist/ mkdir -p .dist/$(WAREWULF)-$(VERSION) - git ls-files >.dist/git-ls-files - tar -c --files-from .dist/git-ls-files | tar -C .dist/$(WAREWULF)-$(VERSION) -x - cp -a vendor/ $(config) .dist/$(WAREWULF)-$(VERSION) + (git ls-files; printf "%s\n" $(config)) >.dist/dist-files + tar -c --files-from .dist/dist-files | tar -C .dist/$(WAREWULF)-$(VERSION) -x + test -d vendor/ && cp -a vendor/ .dist/$(WAREWULF)-$(VERSION) || : scripts/get-version.sh >.dist/$(WAREWULF)-$(VERSION)/VERSION tar -C .dist -czf $(WAREWULF)-$(VERSION).tar.gz $(WAREWULF)-$(VERSION) rm -rf .dist/