diff --git a/scripts/release.sh b/scripts/release.sh index 993ccff8f8e..efc7bfb1b5d 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -86,10 +86,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}" - run git clone "${REPOSITORY}" --branch "${BRANCH}" --depth 1 + if [ "${IN_PLACE}" == 0 ]; then + if [ ! -d "${reldir}/etcd" ]; then + mkdir -p "${reldir}" + cd "${reldir}" + run git clone "${REPOSITORY}" --branch "${BRANCH}" --depth 1 + fi run cd "${reldir}/etcd" || exit 2 run git checkout "${BRANCH}" || exit 2 run git pull origin