Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
build: Don't install git hooks when running under a CI
Browse files Browse the repository at this point in the history
Don't use git hooks when running under the CI as it will remove the
crucial `config-generated.go` file, which will cause `go test` to fail.

Fixes #984.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Feb 2, 2018
1 parent 4f3b27f commit 1c45133
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ ifneq (,$(call DIR_EXISTS,.git))
HANDLE_GIT_HOOKS = install-git-hooks
endif

# Don't install hooks when running under the CI as they will stop the
# tests from running.
#
# See: https://github.com/clearcontainers/runtime/issues/984
ifneq (,$(CI))
HANDLE_GIT_HOOKS =
endif

default: $(TARGET) $(CONFIG) $(HANDLE_GIT_HOOKS)
.DEFAULT: default

Expand Down

0 comments on commit 1c45133

Please sign in to comment.