From 51226c8e50d03960d5c03ac1382d2d7db6c66eab Mon Sep 17 00:00:00 2001 From: Ryan Rawdon Date: Wed, 25 May 2022 10:43:23 -0400 Subject: [PATCH] Proposed fix for netbox-docker #765 -- SKIP_GIT will skip other git operations --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 1cf6cd1..ffee555 100755 --- a/build.sh +++ b/build.sh @@ -178,7 +178,7 @@ fi ### BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M+00:00')" -if [ -d ".git" ]; then +if [ -d ".git" ] && [ -z "${SKIP_GIT}" ]; then GIT_REF="$(git rev-parse HEAD)" fi @@ -186,7 +186,7 @@ fi PROJECT_VERSION="${PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}" # Get the Git information from the netbox directory -if [ -d "${NETBOX_PATH}/.git" ]; then +if [ -d "${NETBOX_PATH}/.git" ] && [ -z "${SKIP_GIT}" ]; then NETBOX_GIT_REF=$( cd "${NETBOX_PATH}" git rev-parse HEAD