Skip to content

Commit 3f23419

Browse files
authored
Merge pull request #768 from FliesLikeABrick/feature/skip-git-no-git-operations-fix-#765
Proposing SKIP_GIT now skips all git operations
2 parents 78fe47a + 51226c8 commit 3f23419

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ fi
178178
###
179179
BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M+00:00')"
180180

181-
if [ -d ".git" ]; then
181+
if [ -d ".git" ] && [ -z "${SKIP_GIT}" ]; then
182182
GIT_REF="$(git rev-parse HEAD)"
183183
fi
184184

185185
# Read the project version from the `VERSION` file and trim it, see https://stackoverflow.com/a/3232433/172132
186186
PROJECT_VERSION="${PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}"
187187

188188
# Get the Git information from the netbox directory
189-
if [ -d "${NETBOX_PATH}/.git" ]; then
189+
if [ -d "${NETBOX_PATH}/.git" ] && [ -z "${SKIP_GIT}" ]; then
190190
NETBOX_GIT_REF=$(
191191
cd "${NETBOX_PATH}"
192192
git rev-parse HEAD

0 commit comments

Comments
 (0)