Module: check_mk
Branch: master
Commit: a8266fc182e0a17d503c172df50c6244ee902a11
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a8266fc182e0a1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 11 13:22:49 2014 +0200
Fixed version transform for nightly builds
---
agents/windows/Makefile | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/agents/windows/Makefile b/agents/windows/Makefile
index fea1d34..7a369e8 100755
--- a/agents/windows/Makefile
+++ b/agents/windows/Makefile
@@ -68,10 +68,14 @@ check_mk_agent-64.res: check_mk_agent.rc
$(WINDRES_64) $< -O coff -o $@
check_mk_agent.rc: check_mk_agent.rc.in
+ # length checks are needed to add missing parts to version.
+ # 6: e.g. 1.2.4
+ # 12: nightly builds
+ # 11: i1 releases
V=$(VERSION) ; V=$${V//./, } ; V=$${V//i/, 1} ; V=$${V//b/, 2} ; V=$${V//p/0} ; \
- if [ $${#V} -eq 6 ]; then V+=", 0"; fi ; \ # e.g. 1.2.4
- if [ $${#V} -eq 12 ]; then V+=", 0"; fi ; \ # nightly builds
- if [ $${#V} -eq 11 ]; then V+="00"; fi ; \ # i1 releases
+ if [ $${#V} -eq 6 ]; then V+=", 0"; fi ; \
+ if [ $${#V} -eq 12 ]; then V+=", 0"; fi ; \
+ if [ $${#V} -eq 11 ]; then V+="00"; fi ; \
sed "s/%VERSION%/$(VERSION)/g;s/%YEAR%/$$(date +%Y)/g" check_mk_agent.rc.in
> check_mk_agent.rc ; \
sed -i "s/%PVERSION%/$$V/g" check_mk_agent.rc