From b8dbe6135c0f8be5170abc635e914de326ee0ad9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 4 Sep 2018 08:19:11 +1000 Subject: [PATCH] Remove leading v in archive names when generating releases --- src/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index eef5a2c26..b582de5ef 100644 --- a/src/Makefile +++ b/src/Makefile @@ -118,12 +118,13 @@ clean: dist: @if ! [ -d ../.git ]; then echo "make dist can only run from a git repo"; false; fi @if git status -s | grep -qEv '^\?\?'; then echo "working tree is not clean"; false; fi - cd ../; \ - git archive --format=tar --prefix=kakoune-$(version)/ HEAD -o kakoune-$(version).tar; \ - echo "$(version)" > src/.version; \ - tar --transform "s,^,kakoune-$(version)/," -rf kakoune-$(version).tar src/.version; \ - rm src/.version; \ - bzip2 kakoune-$(version).tar; + cd ../; \ + basename="kakoune-$$(echo "$(version)" | sed -e s/^v//)"; \ + git archive --format=tar --prefix=$${basename}/ HEAD -o $${basename}.tar; \ + echo "$(version)" > src/.version; \ + tar --transform "s,^,$${basename}/," -rf $${basename}.tar src/.version; \ + rm src/.version; \ + bzip2 $${basename}.tar; distclean: clean rm -f kak kak$(suffix)