From 47a0ca0ec4757038682fd126645c9da8d2ddb11b Mon Sep 17 00:00:00 2001 From: samuel Date: Thu, 11 May 2023 01:36:29 +0200 Subject: [PATCH] [Fix] Use branch HEAD for git archive command --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d4e433f..04e5c94 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ NAME = netoik-api VERSION = $(shell [ -d ".git" ] && git describe | sed "s/-/./g") -BRANCH = $(shell [ -d ".git" ] && git branch --show-current) SYSCONFDIR = $(shell rpm --eval "%{_sysconfdir}") UNITDIR = $(shell rpm --eval "%{_unitdir}") @@ -22,7 +21,12 @@ version: tarball: $(HOME)/rpmbuild/SOURCES/$(NAME)-$(VERSION).tar.gz $(HOME)/rpmbuild/SOURCES/$(NAME)-%.tar.gz: . - git archive --format=tar.gz --output=$@ --prefix=$(NAME)-$(VERSION)/ --worktree-attributes --verbose $(BRANCH) + git archive --format=tar.gz \ + --output=$@ \ + --prefix=$(NAME)-$(VERSION)/ \ + --worktree-attributes \ + --verbose \ + HEAD .PHONY: install install: