@@ -5,11 +5,14 @@ LDFLAGS=-buildid= -X sigs.k8s.io/release-utils/version.gitVersion=$(GIT_TAG) -X
55
66KO_DOCKER_REPO ?= ghcr.io/sigstore/scaffolding
77
8- TRILLIAN_VERSION =$(shell go list -m -f '{{ .Version }}' github.com/google/trillian)
8+ TRILLIAN_VERSION =$(shell cd hack && go list -m -f '{{ .Version }}' github.com/google/trillian)
99
10- OMNIWITNESS_VERSION =$(shell go list -m -f '{{ .Version }}' github.com/transparency-dev/witness)
10+ OMNIWITNESS_VERSION =$(shell cd hack && go list -m -f '{{ .Version }}' github.com/transparency-dev/witness)
1111
12- TESSERACT_VERSION =$(shell go list -m -f '{{ .Version }}' github.com/transparency-dev/tesseract)
12+ TESSERACT_VERSION =$(shell cd hack && go list -m -f '{{ .Version }}' github.com/transparency-dev/tesseract)
13+
14+ lint :
15+ go list -f ' {{.Dir}}/...' -m | xargs golangci-lint run
1316
1417# These are the subdirs under config that we'll turn into separate artifacts.
1518artifacts := trillian ctlog fulcio rekor tsa tuf prober
@@ -23,7 +26,7 @@ ko-resolve:
2326 --image-refs imagerefs-$(artifact ) > release-$(artifact ) .yaml )) \
2427 # "Building cloudsqlproxy wrapper"
2528 LDFLAGS=" $( LDFLAGS) " KO_DOCKER_REPO=$(KO_DOCKER_REPO ) \
26- ko build --base-import-paths --platform=all --tags $(GIT_TAG ) ,latest --image-refs imagerefs-cloudsqlproxy ./cmd/cloudsqlproxy
29+ ko build --base-import-paths --platform=all --tags $(GIT_TAG ) ,latest --image-refs imagerefs-cloudsqlproxy ./tools/cloudsqlproxy/ cmd/cloudsqlproxy
2730 # "Building trillian_log_server"
2831 LDFLAGS=" $( LDFLAGS) " KO_DOCKER_REPO=$(KO_DOCKER_REPO ) \
2932 ko build --base-import-paths --platform=all --tags $(TRILLIAN_VERSION ) ,$(GIT_TAG ) ,latest --image-refs imagerefs-trillian_log_server github.com/google/trillian/cmd/trillian_log_server
@@ -66,7 +69,7 @@ release-images: ko-resolve ko-resolve-testdata
6669
6770.PHONY : prober
6871prober :
69- go build -trimpath -ldflags " $( LDFLAGS) " -o $@ ./cmd/prober
72+ go build -trimpath -ldflags " $( LDFLAGS) " -o $@ ./tools/prober/ cmd/prober
7073
7174# ## Testing
7275
@@ -130,52 +133,52 @@ build: build-tuf-server build-cloudsqlproxy build-ctlog-createctconfig build-ctl
130133
131134.PHONY : build-cloudsqlproxy
132135build-cloudsqlproxy :
133- go build -trimpath ./cmd/cloudsqlproxy
136+ go build -trimpath ./tools/cloudsqlproxy/ cmd/cloudsqlproxy
134137
135138.PHONY : build-ctlog-createctconfig
136139build-ctlog-createctconfig :
137- go build -trimpath ./cmd/ctlog/createctconfig
140+ go build -trimpath ./tools/ctlog/ cmd/ctlog/createctconfig
138141
139142.PHONY : build-ctlog-managectroots
140143build-ctlog-managectroots :
141- go build -trimpath ./cmd/ctlog/managectroots
144+ go build -trimpath ./tools/ctlog/ cmd/ctlog/managectroots
142145
143146.PHONY : build-ctlog-verifyfulcio
144147build-ctlog-verifyfulcio :
145- go build -trimpath ./cmd/ctlog/verifyfulcio
148+ go build -trimpath ./tools/ctlog/ cmd/ctlog/verifyfulcio
146149
147150.PHONY : build-fulcio-createcerts
148151build-fulcio-createcerts :
149- go build -trimpath ./cmd/fulcio/createcerts
152+ go build -trimpath ./tools/fulcio/ cmd/fulcio/createcerts
150153
151154.PHONY : build-getoidctoken
152155build-getoidctoken :
153- go build -trimpath ./cmd/getoidctoken
156+ go build -trimpath ./tools/getoidctoken/ cmd/getoidctoken
154157
155158.PHONY : build-rekor-createsecret
156159build-rekor-createsecret :
157- go build -trimpath ./cmd/rekor/rekor-createsecret
160+ go build -trimpath ./tools/rekor/ cmd/rekor/rekor-createsecret
158161
159162.PHONY : build-trillian-createdb
160163build-trillian-createdb :
161- go build -trimpath ./cmd/trillian/createdb
164+ go build -trimpath ./tools/trillian/ cmd/trillian/createdb
162165
163166.PHONY : build-trillian-createtree
164167build-trillian-createtree :
165- go build -trimpath ./cmd/trillian/createtree
168+ go build -trimpath ./tools/trillian/ cmd/trillian/createtree
166169
167170.PHONY : build-trillian-updatetree
168171build-trillian-updatetree :
169- go build -trimpath ./cmd/trillian/updatetree
172+ go build -trimpath ./tools/trillian/ cmd/trillian/updatetree
170173
171174.PHONY : build-tsa-createcertchain
172175build-tsa-createcertchain :
173- go build -trimpath ./cmd/tsa/createcertchain
176+ go build -trimpath ./tools/tsa/ cmd/tsa/createcertchain
174177
175178.PHONY : build-tuf-createsecret
176179build-tuf-createsecret :
177- go build -trimpath ./cmd/tuf/createsecret
180+ go build -trimpath ./tools/tuf/ cmd/tuf/createsecret
178181
179182.PHONY : build-tuf-server
180183build-tuf-server :
181- go build -trimpath ./cmd/tuf/server
184+ go build -trimpath ./tools/tuf/ cmd/tuf/server
0 commit comments