forked from Mirrors/freeswitch
debian: Add support for humanized version string
This commit is contained in:
parent
5fd7643ab1
commit
53c24a93e0
|
@ -8,9 +8,10 @@ sdir="."
|
||||||
check_pwd
|
check_pwd
|
||||||
check_input_ver_build $@
|
check_input_ver_build $@
|
||||||
in_ver="$1"
|
in_ver="$1"
|
||||||
|
in_hrev="$2"
|
||||||
if [ "$in_ver" = "auto" ]; then
|
if [ "$in_ver" = "auto" ]; then
|
||||||
in_ver="$(cat build/next-release.txt)"
|
in_ver="$(cat build/next-release.txt)"
|
||||||
fi
|
fi
|
||||||
eval $(parse_version "$in_ver")
|
eval $(parse_version "$in_ver")
|
||||||
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev"
|
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev" "$in_hrev"
|
||||||
|
|
||||||
|
|
|
@ -143,11 +143,15 @@ get_nightly_version () {
|
||||||
echo "$(get_last_release_ver)+git~$(date -u '+%Y%m%dT%H%M%SZ')~$commit"
|
echo "$(get_last_release_ver)+git~$(date -u '+%Y%m%dT%H%M%SZ')~$commit"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_nightly_revision_human () {
|
||||||
|
echo "git $(git rev-list -n1 --abbrev=7 --abbrev-commit HEAD) $(date -u '+%Y-%m-%d %H:%M:%SZ')"
|
||||||
|
}
|
||||||
|
|
||||||
create_orig () {
|
create_orig () {
|
||||||
{
|
{
|
||||||
set -e
|
set -e
|
||||||
local OPTIND OPTARG
|
local OPTIND OPTARG
|
||||||
local uver="" bundle_deps=false zl=9e
|
local uver="" hrev="" bundle_deps=false zl=9e
|
||||||
while getopts 'bnv:z:' o "$@"; do
|
while getopts 'bnv:z:' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
b) bundle_deps=true;;
|
b) bundle_deps=true;;
|
||||||
|
@ -157,8 +161,10 @@ create_orig () {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND-1))
|
shift $(($OPTIND-1))
|
||||||
[ -z "$uver" ] || [ "$uver" = "nightly" ] \
|
if [ -z "$uver" ] || [ "$uver" = "nightly" ]; then
|
||||||
&& uver="$(get_nightly_version)"
|
uver="$(get_nightly_version)"
|
||||||
|
hrev="$(get_nightly_revision_human)"
|
||||||
|
fi
|
||||||
local treeish="$1" dver="$(mk_dver "$uver")"
|
local treeish="$1" dver="$(mk_dver "$uver")"
|
||||||
local orig="../freeswitch_$dver.orig.tar.xz"
|
local orig="../freeswitch_$dver.orig.tar.xz"
|
||||||
[ -n "$treeish" ] || treeish="HEAD"
|
[ -n "$treeish" ] || treeish="HEAD"
|
||||||
|
@ -175,7 +181,7 @@ create_orig () {
|
||||||
(cd libs && getlibs)
|
(cd libs && getlibs)
|
||||||
git add -f libs
|
git add -f libs
|
||||||
fi
|
fi
|
||||||
./build/set-fs-version.sh "$uver" && git add configure.in
|
./build/set-fs-version.sh "$uver" "$hrev" && git add configure.in
|
||||||
echo "$uver" > .version && git add -f .version
|
echo "$uver" > .version && git add -f .version
|
||||||
git commit --allow-empty -m "nightly v$uver"
|
git commit --allow-empty -m "nightly v$uver"
|
||||||
git archive -v \
|
git archive -v \
|
||||||
|
|
Loading…
Reference in New Issue