summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorjklippel <jklippel@users.noreply.github.com>2022-04-25 18:41:07 +0200
committerGitHub <noreply@github.com>2022-04-26 00:41:07 +0800
commit257cea654cf1fb592fdb5eacc9c1d5a97611a3f1 (patch)
treea66e20f4bf178ff23774181c19b45f4629b311ea /Makefile
parentddbbe6e15ce411a286c2c9ea4e9fb4107fe3cde5 (diff)
downloadgitea-257cea654cf1fb592fdb5eacc9c1d5a97611a3f1.tar.gz
gitea-257cea654cf1fb592fdb5eacc9c1d5a97611a3f1.zip
add a directory prefix `gitea-src-VERSION` to release-tar-file (#19396)
Use a directory prefix instead on creating the tar file. Fixes: #19066
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5ed50a6738..ab112584c6 100644
--- a/Makefile
+++ b/Makefile
@@ -646,7 +646,9 @@ release-sources: | $(DIST_DIRS)
echo $(VERSION) > $(STORED_VERSION_FILE)
# bsdtar needs a ^ to prevent matching subdirectories
$(eval EXCL := --exclude=$(shell tar --help | grep -q bsdtar && echo "^")./)
- tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .
+# use transform to a add a release-folder prefix; in bsdtar the transform parameter equivalent is -s
+ $(eval TRANSFORM := $(shell tar --help | grep -q bsdtar && echo "-s '/^./gitea-src-$(VERSION)/'" || echo "--transform 's|^./|gitea-src-$(VERSION)/|'"))
+ tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) $(TRANSFORM) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .
rm -f $(STORED_VERSION_FILE)
.PHONY: release-docs