]> granicus.if.org Git - zziplib/commitdiff
allow to update by 'make version'
authorGuido Draheim <guidod@gmx.de>
Wed, 15 Apr 2020 23:32:21 +0000 (01:32 +0200)
committerGuido Draheim <guidod@gmx.de>
Wed, 15 Apr 2020 23:32:21 +0000 (01:32 +0200)
GNUmakefile

index efce6efb4837ebd4dbcb10feef32b845ed577e77..860adcbef1bde0f9cb9201cb3081c6983c0a929a 100644 (file)
@@ -34,3 +34,12 @@ boottrap:
 test_%: ; python3 testbuilds.py $@ -vv
 tests:  ; python3 testbuilds.py -vv
 
+version:
+       oldv=`sed -e '/zziplib.VERSION/!d' -e 's:.*zziplib.VERSION."::' -e 's:".*::' CMakeLists.txt` \
+       ; oldr=`echo $$oldv | sed -e 's:.*[.]::'` ; newr=`expr $$oldr + 1` \
+       ; newv=`echo $$oldv | sed -e "s:[.]$$oldr\$$:.$$newr:"` \
+       ; echo "$$oldv -> $$newv" \
+       ; sed -i -e "s:$$oldv:$$newv:" zziplib.spec testbuilds.py \
+       ; sed -i -e "s:$$oldv:$$newv:" */CMakeLists.txt \
+       ; sed -i -e "s:$$oldv:$$newv:" CMakeLists.txt \
+       ; git diff -U0