aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-10-06 08:09:04 +0200
committerChristian Hesse <mail@eworm.de>2015-10-06 08:09:04 +0200
commite42d069327372c19381367998f28765b5e49d8b8 (patch)
tree90a2da3738df9bc56d2632e4d33f830688391d99
parenta7fd2b66fe946585b0c68d6185c60d029b6e63ab (diff)
downloadvis-e42d069327372c19381367998f28765b5e49d8b8.tar.gz
vis-e42d069327372c19381367998f28765b5e49d8b8.tar.xz
add a new Makefile target 'release' to build release tarball
-rw-r--r--Makefile3
-rw-r--r--config.mk3
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 866c67c..2ea4584 100644
--- a/Makefile
+++ b/Makefile
@@ -50,4 +50,7 @@ uninstall:
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/vis.1
+release:
+ git archive --format=tar.xz --prefix=vis-$(RELEASE)/ $(RELEASE) > vis-$(RELEASE).tar.xz
+
.PHONY: all clean dist install uninstall debug
diff --git a/config.mk b/config.mk
index c0919e9..7c9b03d 100644
--- a/config.mk
+++ b/config.mk
@@ -3,6 +3,7 @@ HAVE_ACL=0
HAVE_SELINUX=0
# vis version
+RELEASE = 0.0.0
# try to get a tag and hash first
GITHASH = $(shell git log -1 --format='%h' 2>/dev/null)
GITTAG = $(shell git describe --abbrev=0 --tags 2>/dev/null)
@@ -16,7 +17,7 @@ else ifneq ($(GITHASH),)
VERSION = 0.r${GITREVCOUNT}.g${GITHASH}
else
# this is used when no git is available, e.g. for release tarball
- VERSION = 0.0.0
+ VERSION = ${RELEASE}
endif
# Customize below to fit your system