[Fix] Use branch HEAD for git archive command
This commit is contained in:
parent
e52ab0e19a
commit
47a0ca0ec4
8
Makefile
8
Makefile
|
@ -1,6 +1,5 @@
|
||||||
NAME = netoik-api
|
NAME = netoik-api
|
||||||
VERSION = $(shell [ -d ".git" ] && git describe | sed "s/-/./g")
|
VERSION = $(shell [ -d ".git" ] && git describe | sed "s/-/./g")
|
||||||
BRANCH = $(shell [ -d ".git" ] && git branch --show-current)
|
|
||||||
|
|
||||||
SYSCONFDIR = $(shell rpm --eval "%{_sysconfdir}")
|
SYSCONFDIR = $(shell rpm --eval "%{_sysconfdir}")
|
||||||
UNITDIR = $(shell rpm --eval "%{_unitdir}")
|
UNITDIR = $(shell rpm --eval "%{_unitdir}")
|
||||||
|
@ -22,7 +21,12 @@ version:
|
||||||
tarball: $(HOME)/rpmbuild/SOURCES/$(NAME)-$(VERSION).tar.gz
|
tarball: $(HOME)/rpmbuild/SOURCES/$(NAME)-$(VERSION).tar.gz
|
||||||
|
|
||||||
$(HOME)/rpmbuild/SOURCES/$(NAME)-%.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
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
|
|
Loading…
Reference in New Issue