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}