Skip to content

Commit d9c85cc

Browse files
committed
Resolve repo root in a different way
1 parent 7062742 commit d9c85cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
SELDON_CORE_DIR=..
22
VERSION := $(shell cat ../version.txt)
3+
REPO_ROOT := $(shell git rev-parse --show-toplevel 2>/dev/null || pwd)
34

45
.PHONY: get_apis
56
get_apis:
@@ -106,6 +107,7 @@ fmt:
106107
nbqa isort \
107108
../ --profile black --nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
108109

110+
.ONESHELL:
109111
lint:
110112
#black \
111113
# --check ./ ../testing/scripts \
@@ -121,7 +123,7 @@ lint:
121123
# --no-pager diff \
122124
# --exit-code \
123125
# -- python/licenses/license_info.no_versions.csv
124-
git -C .. --no-pager diff --exit-code -- python/licenses/license_info.no_versions.csv
126+
git -C "$(REPO_ROOT)" --no-pager diff --exit-code -- python/licenses/license_info.no_versions.csv
125127

126128
.PHONY: clean
127129
clean:

0 commit comments

Comments
 (0)