From f6e4801c93392b0c9be626b3a5012b256a547145 Mon Sep 17 00:00:00 2001 From: John Reese Date: Wed, 31 Jul 2013 17:35:53 +0000 Subject: [PATCH] Add support for versioning When building znc-push with the makefile, it will modify the PUSHVERSION define with version info from `git describe`, build the module, and then reset PUSHVERSION back to "dev". When building directly from znc-buildmod, this will ensure the version is always just "dev". A matching command -- `version` -- has been added to the module which will simply echo the value of PUSHVERSION at the time of compilation. --- Makefile | 4 ++++ README.md | 4 ++++ push.cpp | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index f0b8809..0609315 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ +version := $(shell git describe) + push.so: push.cpp + sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"$(version)\"|" push.cpp znc-buildmod push.cpp + sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"dev\"|" push.cpp install: push.so cp push.so $(HOME)/.znc/modules/push.so diff --git a/README.md b/README.md index 08d042c..3eee4af 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,10 @@ Commands Links you to this fine document. +* `version` + + Tells you the tagged build version currently running. + * `set