Skip to content
Snippets Groups Projects
Commit 01d80a14 authored by Nicholas Styles's avatar Nicholas Styles
Browse files

Merge branch 'cherry-pick-08ff978d-21.9' into '21.9'

Sweeping !32277 from master to 21.9.
ATLINFR-3506: Make sure atlasexternals build is done from correct repo

See merge request atlas/athena!32516
parents ba0293c4 f64804fe
No related branches found
No related tags found
No related merge requests found
......@@ -123,6 +123,20 @@ else
echo "${SOURCEDIR} already exists -> assume previous checkout"
fi
# check whether the source directory points to the right repository
RECLONE=false
pushd ${SOURCEDIR}
SOURCEURL=$(git remote get-url origin)
if [ "${SOURCEURL}" != "${EXTERNALSURL}" ] ; then
echo "${SOURCEURL} wasn't cloned from ${EXTERNALSURL}, deleting"
RECLONE=true
fi
popd
if [ $RECLONE = true ] ; then
rm -rf ${SOURCEDIR}
_retry_ git clone ${EXTERNALSURL} ${SOURCEDIR}
fi
# Get the appropriate version of it:
cd ${SOURCEDIR}
_retry_ git fetch --prune origin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment