Make version output more human-friendly

Our main version string is designed for release engineering purposes:
it matches file name conventions used for versioned tarballs and the
versions sort lexicographically while containing all pertinent
information.

With this commit we add in parentheses a more human-friendly rendering
of the version string: we spell out the meaning of each field and
render the datetime in RFC 822 notation.
This commit is contained in:
Travis Cross
2012-07-20 07:33:40 +00:00
parent cae357e784
commit a8019d803c
10 changed files with 48 additions and 6 deletions

View File

@@ -98,15 +98,18 @@ parse_version () {
}
set_fs_ver () {
local ver="$1" major="$2" minor="$3" micro="$4" rev="$5"
local ver="$1" major="$2" minor="$3" micro="$4" rev="$5" hrev="$6"
sed -e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MINOR, \[\).*\(\])\)|\1$minor\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MICRO, \[\).*\(\])\)|\1$micro\2|" \
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], BUG-REPORT-ADDRESS)\)|\1$ver\2|" \
-i configure.in
if [ -n "$rev" ]; then
[ -n "$hrev" ] || hrev="$rev"
sed -e "s|\(AC_SUBST(SWITCH_VERSION_REVISION, \[\).*\(\])\)|\1$rev\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, \[\).*\(\])\)|\1$hrev\2|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION\)|\1|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN\)|\1|" \
-i configure.in
fi
}

View File

@@ -44,7 +44,9 @@ sed -e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
if [ -n "$rev" ]; then
sed -e "s|\(AC_SUBST(SWITCH_VERSION_REVISION, \[\).*\(\])\)|\1$rev\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, \[\).*\(\])\)|\1$rev\2|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION\)|\1|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN\)|\1|" \
-i configure.in
fi