diff options
author | Luca Muscariello <muscariello@ieee.org> | 2022-09-26 08:40:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2022-09-26 08:40:23 +0000 |
commit | 80c26b9e8a8cba1c437d67a39a3844d76fcbe305 (patch) | |
tree | a9a26346c8286923f2bc861223efd1b64f732598 | |
parent | db6aae6b57caca6414287e737885f4c39d314afd (diff) | |
parent | 1a62f6efae96b7472cea698564b5b7ae731e3e02 (diff) |
Merge "fix(Makefile): fix the `make commit-template` target"
-rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -37,6 +37,11 @@ OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\ OS_VERSION_ID = $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') endif +# +# Git Repo detection +# +GIT_INFO = $(shell git -C . rev-parse 2>/dev/null; echo $$?) + ifeq ($(shell uname),Darwin) BUILD_HICNPLUGIN := OFF PUNTING := OFF @@ -85,14 +90,16 @@ help: .PHONY = commit-template commit-template: - @git config commit.template $(COMMIT_TEMPLATE_FILE) +ifeq ($(GIT_INFO),0) + git config commit.template $(COMMIT_TEMPLATE_FILE) +endif .PHONY = vpp-dep vpp-dep: VERSION_PATH=$(VERSIONFILE) sudo -E $(SHELL) scripts/install-vpp.sh .PHONY = dep -dep: vpp-dep #commit-template +dep: vpp-dep ifeq ($(shell uname),Darwin) brew install $(MACOS_DEPENDS) else ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID)) |