File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -122,20 +122,23 @@ help: ## Show this help screen
122
122
.PHONY : all
123
123
all : manager # # Build all binaries
124
124
125
- licenses.csv : go.mod # # Track licenses in a CSV file
125
+ .PHONY : build-licenses.csv
126
+ build-licenses.csv : go.mod # # Track licenses in a CSV file
126
127
@echo " Tracking licenses into file $@ "
127
128
@echo " ========================================"
128
129
GOOS=linux GOARCH=amd64 go mod download
129
130
# https://github.com/google/go-licenses/issues/244
130
- GOTOOLCHAIN=local GOOS=linux GOARCH=amd64 $(GO_LICENSES ) csv --include_tests $(BASE_GO_PACKAGE ) /... > $@
131
+ GOTOOLCHAIN=local GOOS=linux GOARCH=amd64 $(GO_LICENSES ) csv --include_tests $(BASE_GO_PACKAGE ) /... > licenses.csv
131
132
echo $(GOMOD_SHA ) > $(LICENSES_GOMOD_SHA_FILE )
132
133
134
+ .PHONY : recompute-licenses
133
135
recompute-licenses : # # Recompute the licenses.csv only if needed (gomod was changed)
134
- @[ " $( GOMOD_SHA) " == " $( GOMOD_LICENSES_SHA) " ] || $(MAKE ) licenses.csv
136
+ @[ " $( GOMOD_SHA) " == " $( GOMOD_LICENSES_SHA) " ] || $(MAKE ) build- licenses.csv
135
137
136
- licenses-up-to-date :
138
+ .PHONY : licenses-up-to-date
139
+ licenses-up-to-date : # # Check if the licenses.csv is up to date
137
140
@if [ " $( GOMOD_SHA) " != " $( GOMOD_LICENSES_SHA) " ]; then \
138
- echo " licenses.csv needs to be recalculated: git rebase AND run 'make licenses.csv'" ; exit 1; \
141
+ echo " licenses.csv needs to be recalculated: git rebase AND run 'make build- licenses.csv'" ; exit 1; \
139
142
else echo " licenses.csv is OK! (up to date)" ; fi
140
143
141
144
.PHONY : check-licenses
You can’t perform that action at this time.
0 commit comments