Skip to content
Snippets Groups Projects

fix: work with DETECTOR_VERSION refs/pull/615/merge or gh-readonly-queue/main/pr-1245-<hash>

Closed Wouter Deconinck requested to merge wdconinc-master-patch-74174 into master
1 file
+ 22
4
Compare changes
  • Side-by-side
  • Inline
+ 22
4
@@ -45,8 +45,17 @@ else
DEPLOY_TOKEN=""
fi
echo "git clone -b ${DETECTOR_VERSION} --depth 1 ${DETECTOR_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${DETECTOR}.git} ${DETECTOR}"
git clone -b ${DETECTOR_VERSION} --depth 1 ${DETECTOR_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${DETECTOR}.git} ${DETECTOR}
if [[ ${DETECTOR_VERSION} =~ ^refs/.*$ ]] ; then
echo "git clone --depth 1 ${DETECTOR_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${DETECTOR}.git} ${DETECTOR}"
git clone --depth 1 ${DETECTOR_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${DETECTOR}.git} ${DETECTOR}
echo "git -C ${DETECTOR} fetch origin ${DETECTOR_VERSION}"
git -C ${DETECTOR} fetch origin ${DETECTOR_VERSION}
echo "git -C ${DETECTOR} checkout FETCH_HEAD"
git -C ${DETECTOR} checkout FETCH_HEAD
else
echo "git clone -b ${DETECTOR_VERSION} --depth 1 ${DETECTOR_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${DETECTOR}.git} ${DETECTOR}"
git clone -b ${DETECTOR_VERSION} --depth 1 ${DETECTOR_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${DETECTOR}.git} ${DETECTOR}
fi
if [ -f "${DETECTOR}/requirements.txt" ] ; then
python -m pip install -r ${DETECTOR}/requirements.txt
fi
@@ -71,8 +80,17 @@ if [ "${BEAMLINE}" ]; then
else
DEPLOY_TOKEN=""
fi
echo "git clone -b ${BEAMLINE_VERSION} --depth 1 ${BEAMLINE_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE}.git} ${BEAMLINE}"
git clone -b ${BEAMLINE_VERSION} --depth 1 ${BEAMLINE_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE}.git} ${BEAMLINE}
if [[ ${BEAMLINE_VERSION} =~ ^refs/.*$ ]] ; then
echo "git clone --depth 1 ${BEAMLINE_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE}.git} ${BEAMLINE}"
git clone --depth 1 ${BEAMLINE_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE}.git} ${BEAMLINE}
echo "git -C ${BEAMLINE} fetch origin ${BEAMLINE_VERSION}"
git -C ${BEAMLINE} fetch origin ${BEAMLINE_VERSION}
echo "git -C ${BEAMLINE} checkout FETCH_HEAD"
git -C ${BEAMLINE} checkout FETCH_HEAD
else
echo "git clone -b ${BEAMLINE_VERSION} --depth 1 ${BEAMLINE_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE}.git} ${BEAMLINE}"
git clone -b ${BEAMLINE_VERSION} --depth 1 ${BEAMLINE_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE}.git} ${BEAMLINE}
fi
[[ "$?" == "0" ]] || exit 1
rm -rf "${BEAMLINE}/.git"
popd
Loading