From dc84e816625f852a2199d8c1a95feb6cc4f72ecc Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 2 Jul 2013 13:30:31 +0100 Subject: [PATCH] corrected checkout of xenadmin.hg when it does not exists. --- mk/build.sh | 13 ------------- mk/declarations.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/mk/build.sh b/mk/build.sh index 274f16141..13eba68eb 100644 --- a/mk/build.sh +++ b/mk/build.sh @@ -47,19 +47,6 @@ fi set -e ROOT_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )" -cd ${ROOT_DIR} -#DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# now we are sure we are running from the branch root -#cd ${DIR}/../.. - - -if [ -d "xenadmin-ref.hg" ] -then - hg --cwd xenadmin-ref.hg pull -u -else - hg clone ssh://xenhg@hg.uk.xensource.com/carbon/${XS_BRANCH}/xenadmin-ref.hg/ -fi production_jenkins_build() { diff --git a/mk/declarations.sh b/mk/declarations.sh index 18bd19154..d6e609014 100644 --- a/mk/declarations.sh +++ b/mk/declarations.sh @@ -89,6 +89,14 @@ fi XS_BRANCH=`cd $DIR;git config --get remote.origin.url|sed -e 's@.*carbon/\(.*\)/xenadmin.git.*@\1@'` echo Running on branch: $XS_BRANCH +cd ${ROOT_DIR} +if [ -d "xenadmin-ref.hg" ] +then + hg --cwd xenadmin-ref.hg pull -u +else + hg clone ssh://xenhg@hg.uk.xensource.com/carbon/${XS_BRANCH}/xenadmin-ref.hg/ +fi + #rename Jenkins environment variables to distinguish them from ours; remember to use them as get only get_JOB_NAME=${JOB_NAME} get_BUILD_NUMBER=${BUILD_NUMBER}