Makefile: use "git archive" for generating release file

This commit is contained in:
Lars Kruse 2019-07-23 05:13:39 +02:00
parent 9748ebdcfb
commit a3fde3c704
1 changed files with 4 additions and 9 deletions

View File

@ -58,12 +58,7 @@ clean-all: clean-node clean-tgz
tgz: $(TGZ_FILE)
$(TGZ_FILE):
@VERSION="$(VERSION)"; \
echo "Building "$(DIST_DIR)"/muninlite-$$VERSION.tar.gz"; \
mkdir -p "$(DIST_DIR)"; \
cp -ra . "$(DIST_DIR)"/muninlite-$$VERSION 2>/dev/null || true; \
cd "$(DIST_DIR)"; \
rm -rf muninlite-$$VERSION/"$(DIST_DIR)"; \
rm -rf muninlite-$$VERSION/.svn; \
tar zcvf muninlite-$$VERSION.tar.gz muninlite-$$VERSION >/dev/null; \
rm -rf muninlite-$$VERSION;
@echo "Building $@ ..."
@mkdir -p "$(dir $(@))"
git archive --prefix=muninlite-$(VERSION)/ --format=tar --output "$@.tmp" HEAD
mv "$@.tmp" "$@"