mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-01-25 02:07:54 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user