Skip to content

Commit

Permalink
build: use VERSION_SHORT instead of VERSION_STRING
Browse files Browse the repository at this point in the history
We have recently changed VERSION_STRING to append CONFIG_RC at the
end of the string. Thus, for the build system, change it to
VERSION_SHORT where needed, e.g. in release targets where the "+"
appendix is not wished.

Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
borkmann committed Jul 29, 2013
1 parent b25ff2b commit 5526c43
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Cmds
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ RMDIR = echo -e " RM\t$(1)" && rmdir --ignore-fail-on-non-empty $(1) 2> /dev/nu
GZIP = gzip --best -c

# Git related
GIT_ARCHIVE = git archive --prefix=netsniff-ng-$(VERSION_STRING)/ v$(VERSION_STRING) | \
$(1) > ../netsniff-ng-$(VERSION_STRING).tar.$(2)
GIT_TAG = git tag -a $(VERSION_STRING) -s -m "tools: $(VERSION_STRING) release"
GIT_ARCHIVE = git archive --prefix=netsniff-ng-$(VERSION_SHORT)/ v$(VERSION_SHORT) | \
$(1) > ../netsniff-ng-$(VERSION_SHORT).tar.$(2)
GIT_TAG = git tag -a $(VERSION_SHORT) -s -m "$(VERSION_SHORT) release"
GIT_LOG = git shortlog -n --not $(shell git describe --always --abbrev=0 --tags)
GIT_REM = git ls-files -o | xargs rm -rf
GIT_PEOPLE = git log --no-merges $(VERSION_STRING)..HEAD | grep Author: | cut -d: -f2 | \
GIT_PEOPLE = git log --no-merges $(VERSION_SHORT)..HEAD | grep Author: | cut -d: -f2 | \
cut -d\< -f1 | sort | uniq -c | sort -nr
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ ifeq ("$(origin CROSS_LD_LIBRARY_PATH)", "command line")
LDFLAGS += -L$(CROSS_LD_LIBRARY_PATH)
endif

VERSION_STRING = "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(CONFIG_RC)"
VERSION_LONG = "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(CONFIG_RC) ($(NAME))"
VERSION_SHORT = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
VERSION_STRING = "$(VERSION_SHORT)$(CONFIG_RC)"
VERSION_LONG = "$(VERSION_SHORT)$(CONFIG_RC) ($(NAME))"

export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION
export CROSS_COMPILE
Expand Down
12 changes: 6 additions & 6 deletions Misc
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ tag:
$(GIT_TAG)

announcement:
$(Q)echo -e "netsniff-ng $(VERSION_STRING) has been released to the public (http:https://netsniff-ng.org/).\n" > .MAIL_MSG
$(Q)echo -e "netsniff-ng $(VERSION_SHORT) has been released to the public (http:https://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:https://github.com/borkmann/netsniff-ng.git" >> .MAIL_MSG
$(Q)echo -e " git checkout $(VERSION_STRING)\n" >> .MAIL_MSG
$(Q)echo -e " git checkout $(VERSION_SHORT)\n" >> .MAIL_MSG
$(Q)echo -e "Or via HTTP, through:\n" >> .MAIL_MSG
$(Q)echo -e " wget http:https://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-$(VERSION_STRING).tar.gz\n" >> .MAIL_MSG
$(Q)echo -e " wget http:https://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-$(VERSION_SHORT).tar.gz\n" >> .MAIL_MSG
$(Q)echo -e "The release be verified via Git, through (see README):\n" >> .MAIL_MSG
$(Q)echo -e " git tag -v $(VERSION_STRING)\n" >> .MAIL_MSG
$(Q)echo -e " git tag -v $(VERSION_SHORT)\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 "Contributors since last release:\n" >> .MAIL_MSG
$(GIT_PEOPLE) >> .MAIL_MSG
$(Q)echo -e "\nGit changelog since the last release:\n" >> .MAIL_MSG
$(GIT_LOG) >> .MAIL_MSG

release: announcement tag tarball
$(Q)echo "Released $(bold)$(VERSION_STRING)$(normal)"
release: tag announcement tarball
$(Q)echo "Released $(bold)$(VERSION_SHORT)$(normal)"

FIND_SOURCE_FILES = ( git ls-files '*.[hcS]' 2>/dev/null || \
find . \( -name .git -type d -prune \) \
Expand Down

0 comments on commit 5526c43

Please sign in to comment.