We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ed4831 commit af9df96Copy full SHA for af9df96
bump
@@ -1,9 +1,20 @@
1
#!/bin/bash
2
3
-#Usage ./bump major.minor.patch
+#Usage ./bump [major.minor.patch]
4
+#If no release is used, reuse old release number and just add a date tag
5
6
RELEASE=$1
-V="${RELEASE}_$(date +%Y%m%d)"
7
+OLDRELEASE=$(grep AC_INIT configure.ac | cut -f3 -d'[' | cut -f1 -d'_' | cut -f1 -d']')
8
+if test -z "$RELEASE"
9
+then
10
+ RELEASE=$OLDRELEASE
11
+fi
12
+if [ "$RELEASE" = "$OLDRELEASE" ]
13
14
+ V="${RELEASE}_$(date +%Y%m%d)"
15
+else
16
+ V="${RELEASE}"
17
18
U=$(env LANG=en_US.UTF-8 date +'%B %d, %Y')
19
sed -e "s/AC_INIT(\([^ ,]*, *\[\)[0-9._\-]*/AC_INIT(\1$V/g" -e "s/UPDATED=\".*\"/UPDATED=\"$U\"/g" configure.ac >configure.ac+ && mv configure.ac+ configure.ac
20
dvcs ci -m "Bump version number"
0 commit comments