ci: wrap sanity checks
This commit is contained in:
parent
c204243b1b
commit
20ac9757ba
|
@ -73,13 +73,17 @@ gnuize () {
|
||||||
rm -rf .git
|
rm -rf .git
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -d .git ]; then
|
check_pwd () {
|
||||||
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
|
if [ ! -d .git ]; then
|
||||||
exit 1;
|
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
|
||||||
fi
|
exit 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
check_input_ver_build () {
|
||||||
echo "usage: $0 <version> <build-number>" 1>&2
|
if [ -z "$1" ]; then
|
||||||
exit 1;
|
echo "usage: $0 <version> <build-number>" 1>&2
|
||||||
fi
|
exit 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ sdir="."
|
||||||
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
||||||
. $sdir/common.sh
|
. $sdir/common.sh
|
||||||
|
|
||||||
|
check_pwd
|
||||||
|
check_input_ver_build
|
||||||
eval $(parse_version "$1")
|
eval $(parse_version "$1")
|
||||||
datestamp="$(date +%Y%m%dT%H%M%SZ)"
|
datestamp="$(date +%Y%m%dT%H%M%SZ)"
|
||||||
nightly="n${datestamp}"
|
nightly="n${datestamp}"
|
||||||
|
|
|
@ -5,6 +5,8 @@ sdir="."
|
||||||
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
||||||
. $sdir/common.sh
|
. $sdir/common.sh
|
||||||
|
|
||||||
|
check_pwd
|
||||||
|
check_input_ver_build
|
||||||
eval $(parse_version "$1")
|
eval $(parse_version "$1")
|
||||||
build="$2"
|
build="$2"
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ sdir="."
|
||||||
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
||||||
. $sdir/common.sh
|
. $sdir/common.sh
|
||||||
|
|
||||||
|
check_pwd
|
||||||
|
check_input_ver_build
|
||||||
eval $(parse_version "$1")
|
eval $(parse_version "$1")
|
||||||
build="$2"
|
build="$2"
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ sdir="."
|
||||||
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
||||||
. $sdir/common.sh
|
. $sdir/common.sh
|
||||||
|
|
||||||
|
check_pwd
|
||||||
|
check_input_ver_build
|
||||||
eval $(parse_version "$1")
|
eval $(parse_version "$1")
|
||||||
|
|
||||||
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
||||||
|
|
Loading…
Reference in New Issue