From a39adbd2d86d1259bf0d5f3090f785a96a6f50e3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 16 Sep 2020 15:23:47 -0400 Subject: [PATCH] Use git fetch instead of pull. Pull doesn't always get the tags. Die if checkout failed --- utils/do_debian_package.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index f95cc6523..c7ca25e35 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -156,10 +156,14 @@ if [ ! -d "${GITHUB_FORK}_zoneminder_release" ]; then if [ -d "${GITHUB_FORK}_ZoneMinder.git" ]; then echo "Using local clone ${GITHUB_FORK}_ZoneMinder.git to pull from." cd "${GITHUB_FORK}_ZoneMinder.git" - echo "git pull..." - git pull + echo "git fetch..." + git fetch echo "git checkout $BRANCH" git checkout $BRANCH + if [ $? -ne 0 ]; then + echo "Failed to switch to branch." + exit 1; + fi; echo "git pull..." git pull cd ../