This repository was archived by the owner on Oct 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 45
45
- name : Vendor dependencies to retrieve licenses locally
46
46
# Vendor deps before running https://github.com/goph/licensei
47
47
# to avoid false-positives when modules GitHub repo could not be determined
48
- run : go mod vendor
48
+ run : make gomod- vendor
49
49
50
50
- name : Check licenses
51
51
env :
Original file line number Diff line number Diff line change @@ -149,13 +149,29 @@ e2e: docker ## Run end-to-end test suite
149
149
cd e2e && \
150
150
go test -v -failfast -test.v -test.paniconexit0 -timeout 2h -ginkgo.v .
151
151
152
+ VENDORMODULES = $(addprefix vendor-, $(GOMODULES ) )
153
+
154
+ $(VENDORMODULES ) :
155
+ cd $(dir $(@:vendor-%=% ) ) && go mod vendor
156
+
157
+ .PHONY : gomod-vendor
158
+ gomod-vendor : $(VENDORMODULES ) # Make vendored copy of dependencies for all modules
159
+
160
+ LICENSECHECKMODULES = $(GOMODULES )
161
+
162
+ $(LICENSECHECKMODULES ) :
163
+ cd $(dir $(@:license-check-%=% ) ) && " $( LICENSEI_BIN) " check --config " $( LICENSEI_CONFIG) "
164
+
152
165
.PHONY : license-check
153
- license-check : bin/licensei license-cache # # Check licenses for software components
154
- $(LICENSEI_BIN ) check
166
+ license-check : bin/licensei license-cache $(LICENSECHECKMODULES ) # # Check licenses for software components
167
+
168
+ LICENSECACHEMODULES = $(addprefix license-cache-, $(GOMODULES ) )
169
+
170
+ $(LICENSECACHEMODULES ) :
171
+ cd $(dir $(@:license-cache-%=% ) ) && " $( LICENSEI_BIN) " cache --config " $( LICENSEI_CONFIG) "
155
172
156
- .PHONY : license-cache
157
- license-cache : bin/licensei # # Generate license cache
158
- $(LICENSEI_BIN ) cache
173
+ +.PHONY : license-cache
174
+ license-cache : bin/licensei $(LICENSECACHEMODULES ) # # Generate license cache
159
175
160
176
.PHONY : lint
161
177
lint : license-check lint-actions lint-bicep lint-cfn lint-go lint-helm # # Run all the linters
Original file line number Diff line number Diff line change 3
3
# ###
4
4
5
5
LICENSEI_BIN := $(BIN_DIR ) /licensei
6
+ LICENSEI_CONFIG := $(ROOT_DIR ) /.licensei.toml
6
7
LICENSEI_VERSION = 0.9.0
7
8
8
9
bin/licensei : bin/licensei-$(LICENSEI_VERSION )
You can’t perform that action at this time.
0 commit comments