Skip to content

Commit

Permalink
Stabilize fetch_terraform.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hostirosti authored Sep 21, 2023
1 parent 4dc2f3d commit b5c9c00
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion terraform/aws/fetch_terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ readonly CONTROL_PLANE_REPO_DIR="${WORK_DIR}/${CONTROL_PLANE_REPO_RELDIR}"
if [[ -d ${CONTROL_PLANE_REPO_DIR} ]] && ! [[ -r ${CONTROL_PLANE_REPO_DIR}/.git/config ]]; then
rm -rf ${CONTROL_PLANE_REPO_DIR}
fi
# cleanup old control plane shared libraries repo
if [[ -d control-plane-shared-libraries ]]; then
rm -rf control-plane-shared-libraries
fi
if ! [[ -d ${CONTROL_PLANE_REPO_DIR} ]]; then
git clone https://github.com/privacysandbox/coordinator-services-and-shared-libraries "${CONTROL_PLANE_REPO_DIR}" || true
fi
git -C "${CONTROL_PLANE_REPO_DIR}" checkout "${CONTROL_PLANE_SHARED_LIBRARIES_VERSION}"
git -C "${CONTROL_PLANE_REPO_DIR}" fetch origin "${CONTROL_PLANE_SHARED_LIBRARIES_VERSION}"
git -C "${CONTROL_PLANE_REPO_DIR}" checkout FETCH_HEAD
git -C "${CONTROL_PLANE_REPO_DIR}" clean -df

# remove existing symlinks
Expand Down

0 comments on commit b5c9c00

Please sign in to comment.