mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
make: Improve tar generation
By default it generates archive name same as a tag name, but Pavel requested to match old scheme and strip off "v" prefix. Reported-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
fc2c3c94b8
commit
d55a1fdd31
13
Makefile
13
Makefile
@ -165,12 +165,17 @@ test: zdtm
|
|||||||
$(Q) MAKEFLAGS= $(MAKE) -C test
|
$(Q) MAKEFLAGS= $(MAKE) -C test
|
||||||
PHONY += test
|
PHONY += test
|
||||||
|
|
||||||
tar-name := $(shell git tag -l v$(CRIU_VERSION))
|
#
|
||||||
ifeq ($(tar-name),)
|
# Generating tar requires tag matched CRIU_VERSION.
|
||||||
tar-name := $(shell git describe)
|
# If not found then simply use GIT's describe with
|
||||||
|
# "v" prefix stripped.
|
||||||
|
head-name := $(shell git tag -l v$(CRIU_VERSION))
|
||||||
|
ifeq ($(head-name),)
|
||||||
|
head-name := $(shell git describe)
|
||||||
endif
|
endif
|
||||||
|
tar-name := $(shell echo $(head-name) | sed -e 's/^v//g')
|
||||||
criu-$(tar-name).tar.bz2:
|
criu-$(tar-name).tar.bz2:
|
||||||
git archive --format tar --prefix 'criu-$(tar-name)/' $(tar-name) | bzip2 > $@
|
git archive --format tar --prefix 'criu-$(tar-name)/' $(head-name) | bzip2 > $@
|
||||||
dist tar: criu-$(tar-name).tar.bz2
|
dist tar: criu-$(tar-name).tar.bz2
|
||||||
@true
|
@true
|
||||||
.PHONY: dist tar
|
.PHONY: dist tar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user