fix git checkout from wrong working directory when other than master branch used
This commit is contained in:
@@ -15,7 +15,7 @@ CONFIGUPDATE=true
|
|||||||
# Location of Xen Orchestra repository where source code is fetched
|
# Location of Xen Orchestra repository where source code is fetched
|
||||||
REPOSITORY="https://github.com/vatesfr/xen-orchestra"
|
REPOSITORY="https://github.com/vatesfr/xen-orchestra"
|
||||||
|
|
||||||
# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched.
|
# Git branch, tag (append tags/ before the tag name) or individual commit where xen-orchestra sources are fetched.
|
||||||
# Also, you can set this to "release" to use the latest tagged branch.
|
# Also, you can set this to "release" to use the latest tagged branch.
|
||||||
BRANCH="master"
|
BRANCH="master"
|
||||||
|
|
||||||
|
@@ -490,15 +490,14 @@ function InstallXO {
|
|||||||
echo
|
echo
|
||||||
printinfo "Checking out latest tagged release '$TAG'"
|
printinfo "Checking out latest tagged release '$TAG'"
|
||||||
|
|
||||||
runcmd "git checkout $TAG"
|
runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && git checkout $TAG"
|
||||||
runcmd "cd $(dirname "$0")"
|
runcmd "cd $(dirname "$0")"
|
||||||
# we don't need to do much magic if specific branch set so just checkout
|
# we don't need to do much magic if specific branch set so just checkout
|
||||||
elif [[ "$BRANCH" != "master" ]]; then
|
elif [[ "$BRANCH" != "master" ]]; then
|
||||||
echo
|
echo
|
||||||
printinfo "Checking out source code from branch '$BRANCH'"
|
printinfo "Checking out source code from branch/commit '$BRANCH'"
|
||||||
|
|
||||||
runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME"
|
runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && git checkout $BRANCH"
|
||||||
runcmd "git checkout $BRANCH"
|
|
||||||
runcmd "cd $(dirname "$0")"
|
runcmd "cd $(dirname "$0")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user