Added ability to update only to tagged releases.
This commit is contained in:
@@ -7,7 +7,8 @@ PORT="80"
|
|||||||
# Base dir for installation and future updates
|
# Base dir for installation and future updates
|
||||||
INSTALLDIR="/etc/xo"
|
INSTALLDIR="/etc/xo"
|
||||||
|
|
||||||
# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched
|
# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched.
|
||||||
|
# Also, you can set this to "release" to use the latest tagged branch.
|
||||||
BRANCH="master"
|
BRANCH="master"
|
||||||
|
|
||||||
# Log path for possible errors
|
# Log path for possible errors
|
||||||
|
@@ -266,7 +266,16 @@ function InstallXO {
|
|||||||
rm -rf "$INSTALLDIR/xo-builds/xen-orchestra-$TIME"
|
rm -rf "$INSTALLDIR/xo-builds/xen-orchestra-$TIME"
|
||||||
cp -r "$XO_SRC_DIR" "$INSTALLDIR/xo-builds/xen-orchestra-$TIME"
|
cp -r "$XO_SRC_DIR" "$INSTALLDIR/xo-builds/xen-orchestra-$TIME"
|
||||||
|
|
||||||
if [[ "$BRANCH" != "master" ]]; then
|
if [[ "$BRANCH" == "release" ]]; then
|
||||||
|
cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME
|
||||||
|
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Checking out latest tagged release '$TAG'"
|
||||||
|
|
||||||
|
git checkout $TAG 2> /dev/null # Suppress the detached-head message.
|
||||||
|
cd $(dirname $0)
|
||||||
|
elif [[ "$BRANCH" != "master" ]]; then
|
||||||
echo
|
echo
|
||||||
echo "Checking out source code from branch '$BRANCH'"
|
echo "Checking out source code from branch '$BRANCH'"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user