projects
/
platform
/
upstream
/
libzypp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2cbf746
)
mkChangelog new version convenience
author
Michael Andres
<ma@suse.de>
Thu, 12 Dec 2013 16:58:18 +0000
(17:58 +0100)
committer
Michael Andres
<ma@suse.de>
Thu, 12 Dec 2013 17:00:29 +0000
(18:00 +0100)
mkChangelog
patch
|
blob
|
history
diff --git
a/mkChangelog
b/mkChangelog
index
e06c883
..
0e94c4e
100755
(executable)
--- a/
mkChangelog
+++ b/
mkChangelog
@@
-84,10
+84,18
@@
function getversion() {
printf "LAST_COMPAT='%s'\n", lastcompat
printf "THIS_RELEASE='%s'\n", major"."minor"."patch
printf "THIS_COMPAT='%s'\n", compatminor
printf "LAST_COMPAT='%s'\n", lastcompat
printf "THIS_RELEASE='%s'\n", major"."minor"."patch
printf "THIS_COMPAT='%s'\n", compatminor
+ printf "THIS_MINOR='%s'\n", minor
+ printf "THIS_PATCH='%s'\n", patch
}
'
}
}
'
}
+function setversion() {
+ local KEY="$1"
+ local VAL="$2"
+ sed -i "s/^ *SET *( *${KEY} .*/SET(${KEY} \"${VAL}\")/" "$VERSIONFILE"
+}
+
function sameVersion() {
test "$LAST_RELEASE" == "$THIS_RELEASE" -a "$LAST_COMPAT" == "$THIS_COMPAT"
}
function sameVersion() {
test "$LAST_RELEASE" == "$THIS_RELEASE" -a "$LAST_COMPAT" == "$THIS_COMPAT"
}
@@
-153,9
+161,9
@@
while true; do
sameVersion && {
newchangesentry
Becho "!!! Version is unchanged at $LAST_RELEASE ($LAST_COMPAT)."
sameVersion && {
newchangesentry
Becho "!!! Version is unchanged at $LAST_RELEASE ($LAST_COMPAT)."
- read -n 1 -p "$(Gecho "(a)bort, (c)ontinue, (e)dit version [e]: ")" RES
+ read -n 1 -p "$(Gecho "(a)bort, (c)ontinue, (
P) patch, (M) minor, (I) incompat minor, (
e)dit version [e]: ")" RES
echo
echo
- case "${RES:-
e
}" in
+ case "${RES:-
x
}" in
[eE]*)
$EDITOR $VERSIONFILE
eval $(getversion)
[eE]*)
$EDITOR $VERSIONFILE
eval $(getversion)
@@
-165,6
+173,24
@@
while true; do
Becho "!!! Leave $VERSIONFILE untouched"
break
;;
Becho "!!! Leave $VERSIONFILE untouched"
break
;;
+ [P])
+ setversion LIBZYPP_PATCH $(($THIS_PATCH + 1))
+ eval $(getversion)
+ continue
+ ;;
+ [M])
+ setversion LIBZYPP_MINOR $(($THIS_MINOR + 1))
+ setversion LIBZYPP_PATCH 0
+ eval $(getversion)
+ continue
+ ;;
+ [I])
+ setversion LIBZYPP_COMPATMINOR $(($THIS_MINOR + 1))
+ setversion LIBZYPP_MINOR $(($THIS_MINOR + 1))
+ setversion LIBZYPP_PATCH 0
+ eval $(getversion)
+ continue
+ ;;
*)
errexit "aborted"
;;
*)
errexit "aborted"
;;