Module: check_mk
Branch: master
Commit: cdfde1f8ae81817b4afb282c1ebb838695bebf48
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cdfde1f8ae8181…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Nov 25 08:56:37 2015 +0100
Make the 'setversion' target a tiny bit less fragile.
---
Makefile | 2 +-
agents/Makefile | 2 +-
agents/windows/Makefile | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 56786f3..b190dc8 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,7 @@ version:
if [ -n "$$newversion" ] ; then $(MAKE) NEW_VERSION=$$newversion setversion ;
fi
setversion:
- sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile ;
\
+ sed -ri 's/^(VERSION[[:space:]]*:?= *).*/\1'"$(NEW_VERSION)/" Makefile
; \
sed -i 's/^AC_INIT.*/AC_INIT([MK Livestatus],
['"$(NEW_VERSION)"'], [mk(a)mathias-kettner.de])/'
livestatus/configure.ac ; \
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
mkeventd/bin/mkeventd ; \
sed -i 's/^VERSION=.*/VERSION='"$(NEW_VERSION)"'/'
scripts/setup.sh ; \
diff --git a/agents/Makefile b/agents/Makefile
index 6dc685d..8a713b7 100644
--- a/agents/Makefile
+++ b/agents/Makefile
@@ -56,7 +56,7 @@ setversion:
if [ -d ../.git ]; then \
git rm -f *.rpm *.deb || true ; \
fi
- sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile ;
\
+ sed -ri 's/^(VERSION[[:space:]]*:?= *).*/\1'"$(NEW_VERSION)/" Makefile
; \
sed -i 's/say "Version: .*"/say "Version: $(NEW_VERSION)"/'
check_mk_agent.openvms ; \
for agent in check_mk_agent.*; do \
if [ "$$agent" != windows -a "$$agent" != plugins -a
"$$agent" != hpux ] ; then \
diff --git a/agents/windows/Makefile b/agents/windows/Makefile
index 39f62f3..51d40ca 100644
--- a/agents/windows/Makefile
+++ b/agents/windows/Makefile
@@ -46,7 +46,7 @@ all: directories fix_linebreaks check_mk_agent.exe check_mk_agent-64.exe
install
setversion:
sed -i 's/!define CHECK_MK_VERSION .*/!define CHECK_MK_VERSION
"'$(NEW_VERSION)'"/' installer*.nsi ; \
- sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile ;
\
+ sed -ri 's/^(VERSION[[:space:]]*:?= *).*/\1'"$(NEW_VERSION)/" Makefile
; \
rm check_mk_agent.exe check_mk_agent-64.exe check_mk_agent.msi ; \
make install_agent.exe install_agent-64.exe msi_installer
@@ -124,7 +124,6 @@ check_mk_agent-64.exe.versioned:
%.exe: %.unversioned.exe %.exe.versioned
-
# -----------------------------------------------------------------------------
# NSIS installer will be removed and replaced by multiarch MSI installer