Skip to content

Commit de488bb

Browse files
Replace tools.go w/ explicit versions in Makefile (#8)
Replace tools.go with explicit versioning of build-time tooling in the Makefile (e.g. go run [email protected]). Because this is a library imported by other projects, my preference is to keep go.mod narrowly focused on the dependencies of the code itself and not the ancillary tools used by Elastic to maintain its NOTICE.txt and license headers. Co-authored-by: Panos Koutsovasilis <[email protected]>
1 parent fdf6c6e commit de488bb

File tree

5 files changed

+6
-1012
lines changed

5 files changed

+6
-1012
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
GO_LICENSE_DETECTOR := go run go.elastic.co/[email protected]
2+
GO_LICENSER := go run github.com/elastic/[email protected]
3+
14
.PHONY: tidy lint test notice write-license-headers
25

36
all: tidy lint test notice write-license-headers
@@ -15,7 +18,7 @@ notice:
1518
@echo "Generate NOTICE"
1619
go mod tidy
1720
go mod download
18-
go list -m -json all | go run go.elastic.co/go-licence-detector \
21+
go list -m -json all | $(GO_LICENSE_DETECTOR) \
1922
-includeIndirect \
2023
-rules tools/notice/rules.json \
2124
-overrides tools/notice/overrides.json \
@@ -25,7 +28,7 @@ notice:
2528

2629
write-license-headers:
2730
@echo "Write license headers"
28-
go run github.com/elastic/go-licenser \
31+
$(GO_LICENSER) \
2932
-ext ".go" \
3033
-license ASL2 \
3134
-licensor "Elasticsearch B.V." \

0 commit comments

Comments
 (0)