This commit is contained in:
Mafoo 2017-03-01 07:26:10 +00:00 committed by GitHub
commit 0e9ca19e2b
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ if [ .$USE_SYSTEM_MASTER = .true ]; then
BRANCH=""
else
FUSION_MAJOR=$(git ls-remote --heads https://github.com/fusionpbx/fusionpbx.git | cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1)
FUSION_MINOR=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git $FUSION_MAJOR.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2)
FUSION_MINOR=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git | grep "$FUSION_MAJOR.*" | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2)
FUSION_VERSION=$FUSION_MAJOR.$FUSION_MINOR
verbose "Using version $FUSION_VERSION"
BRANCH="-b $FUSION_VERSION"

View File

@ -14,7 +14,7 @@ CWD=$(pwd)
#git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
#git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
SWITCH_MAJOR=$(git ls-remote --heads https://freeswitch.org/stash/scm/fs/freeswitch.git "v*" | cut -d/ -f 3 | grep -P '^v\d+\.\d+' | sort | tail -n 1| cut -dv -f2)
SWITCH_MINOR=$(git ls-remote --tags https://freeswitch.org/stash/scm/fs/freeswitch.git v$SWITCH_MAJOR.* | cut -d/ -f3 | cut -dv -f2 | cut -d. -f3 | sort -n | tail -n1)
SWITCH_MINOR=$(git ls-remote --tags https://freeswitch.org/stash/scm/fs/freeswitch.git | grep "v$SWITCH_MAJOR\.*" | cut -d/ -f3 | cut -dv -f2 | cut -d. -f3 | sort -n | tail -n1)
SWITCH_VERSION=$SWITCH_MAJOR.$SWITCH_MINOR
echo "Using version $SWITCH_VERSION"
cd /usr/src