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 <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-07 14:37:29 -07:00
parent 97cc5576b1
commit 0160248429

View File

@@ -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/