mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-04 19:31:56 +00:00
ci: factor out common code
This commit is contained in:
@@ -1,23 +1,11 @@
|
||||
#!/bin/bash
|
||||
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
||||
|
||||
src_repo="$(pwd)"
|
||||
|
||||
if [ ! -d .git ]; then
|
||||
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: ./scripts/ci/rpmbuilder.sh MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
ver="$1"
|
||||
major=$(echo "$ver" | cut -d. -f1)
|
||||
minor=$(echo "$ver" | cut -d. -f2)
|
||||
micro=$(echo "$ver" | cut -d. -f3)
|
||||
sdir="."
|
||||
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
||||
. $sdir/common.sh
|
||||
|
||||
eval $(parse_version "$1")
|
||||
build="$2"
|
||||
|
||||
cd rpmbuild/SOURCES
|
||||
|
||||
Reference in New Issue
Block a user