From: Daniel Borkmann Date: Fri, 15 Mar 2013 13:20:43 +0000 (+0100) Subject: build: add make release target X-Git-Tag: v0.5.8-rc1~440 X-Git-Url: https://repo.or.cz/w/netsniff-ng.git/commitdiff_plain/271c2f65bf0acbfe1220822e7d471e0f18d329df 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 --- diff --git a/.gitignore b/.gitignore index dadfb3d9..45663952 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 dea11a20..339d05ed 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)"