summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-03-15 14:20:43 +0100
committerDaniel Borkmann <dborkman@redhat.com>2013-03-15 14:22:30 +0100
commit271c2f65bf0acbfe1220822e7d471e0f18d329df (patch)
treee3c829a46c19c7e2feeaef13520d6cf97a3eacf2
parent2c93b5ae28969362446e94dabe69ef518c171841 (diff)
build: add make release target
It is useful to have as much as possible scripted, to be less error-prone and to have a uniform and simple workflow. Therefore, make the tagging, tarball and mail message in a uniform way. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--.gitignore3
-rw-r--r--Makefile21
2 files changed, 23 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index dadfb3d..4566395 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,5 +38,8 @@ Makefile
*.tar.bz
*.tar.xz
+# Release related stuff
+.MAIL_MSG
+
# Excluded from ignorance
!.gitignore
diff --git a/Makefile b/Makefile
index dea11a2..339d05e 100644
--- a/Makefile
+++ b/Makefile
@@ -126,7 +126,8 @@ RM = echo -e " RM\t$(1)" && rm -rf $(1)
RMDIR = echo -e " RM\t$(1)" && rmdir --ignore-fail-on-non-empty $(1) 2> /dev/null || true
GIT_ARCHIVE = git archive --prefix=netsniff-ng-$(VERSION_STRING)/ $(VERSION_STRING) | \
$(1) > ../netsniff-ng-$(VERSION_STRING).tar.$(2)
-GIT_TAG = git tag -a $(VERSION_STRING) -m "$(VERSION_STRING) release"
+GIT_TAG = git tag -a $(VERSION_STRING) -s -m "tools: $(VERSION_STRING) release"
+GIT_LOG = git shortlog -n
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION
export CROSS_COMPILE
@@ -263,6 +264,23 @@ tarball: tarball.gz tarball.bz2 tarball.xz
tag:
$(GIT_TAG)
+announcement:
+ $(Q)echo -e "netsniff-ng $(VERSION_STRING) has been released to the public (http://netsniff-ng.org/).\n" > .MAIL_MSG
+ $(Q)echo -e "It can be fetched via Git, through:\n" >> .MAIL_MSG
+ $(Q)echo -e " git clone git://github.com/borkmann/netsniff-ng.git" >> .MAIL_MSG
+ $(Q)echo -e " git checkout $(VERSION_STRING)\n" >> .MAIL_MSG
+ $(Q)echo -e "Or via HTTP, through:\n" >> .MAIL_MSG
+ $(Q)echo -e " wget http://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-$(VERSION_STRING).tar.gz\n" >> .MAIL_MSG
+ $(Q)echo -e "The release be verified via Git, through (see Documentation/Workflow):\n" >> .MAIL_MSG
+ $(Q)echo -e " git tag -v $(VERSION_STRING)\n" >> .MAIL_MSG
+ $(Q)echo -e "Major high-level changes since the last release are:\n" >> .MAIL_MSG
+ $(Q)echo -e " *** BLURB HERE ***\n" >> .MAIL_MSG
+ $(Q)echo -e "Git changelog since the last release:\n" >> .MAIL_MSG
+ $(GIT_LOG) >> .MAIL_MSG
+
+release: tag tarball announcement
+ $(Q)echo "Released $(bold)$(VERSION_STRING)$(normal)"
+
FIND_SOURCE_FILES = ( git ls-files '*.[hcS]' 2>/dev/null || \
find . \( -name .git -type d -prune \) \
-o \( -name '*.[hcS]' -type f -print \) )
@@ -295,6 +313,7 @@ help:
$(Q)echo "$(bold)Hacking/development targets:$(normal)"
$(Q)echo " tag - Generate Git tag of current version"
$(Q)echo " tarball - Generate tarball of latest version"
+ $(Q)echo " release - Generate a new release"
$(Q)echo " tags - Generate sparse ctags"
$(Q)echo " cscope - Generate cscope files"
$(Q)echo "$(bold)Misc targets:$(normal)"