Skip to content

Commit

Permalink
Merge pull request #18877 from ivanvc/release-3.4-backport-18812
Browse files Browse the repository at this point in the history
[3.4] release: properly change working dir if tmp location already exists
  • Loading branch information
serathius authored Nov 12, 2024
2 parents c4d1505 + bd959e7 commit 4d43129
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ main() {
# Set up release directory.
local reldir="/tmp/etcd-release-${VERSION}"
log_callout "Preparing temporary directory: ${reldir}"
if [ ! -d "${reldir}/etcd" ] && [ "${IN_PLACE}" == 0 ]; then
mkdir -p "${reldir}"
cd "${reldir}"
git clone "${REPOSITORY}" --branch "${BRANCH}" --depth 1
if [ "${IN_PLACE}" == 0 ]; then
if [ ! -d "${reldir}/etcd" ]; then
mkdir -p "${reldir}"
cd "${reldir}"
git clone "${REPOSITORY}" --branch "${BRANCH}" --depth 1
fi
cd "${reldir}/etcd" || exit 2
git checkout "${BRANCH}" || exit 2
git pull origin
Expand Down

0 comments on commit 4d43129

Please sign in to comment.