11repo_name := github.com/jetstack/jetstack-secure
2- # TODO(wallrj): This is a hack to allow use the old preflight repo name in the
3- # gci section of the golangci-lint config until we can rename the go module.
4- # Without this hack, golangci-lint will complain that the
5- # github.com/jetstack/preflight imports should be grouped with all the other
6- # third-party modules.
7- generate-golangci-lint-config : repo_name := github.com/jetstack/preflight
2+ # This is a work around for the mismatch between the repo name and the go module
3+ # name. It allows golangci-lint to group the github.com/jetstack/preflight
4+ # imports correctly. And it allows the version information to be injected into
5+ # the version package via Go ldflags.
6+ #
7+ # TODO(wallrj): Rename the Go module to match the repository name.
8+ gomodule_name := github.com/jetstack/preflight
9+
10+ generate-golangci-lint-config : repo_name := $(gomodule_name )
811
912license_ignore := gitlab.com/venafi,github.com/jetstack
1013
@@ -16,12 +19,12 @@ build_names := preflight
1619go_preflight_main_dir := .
1720go_preflight_mod_dir := .
1821go_preflight_ldflags := \
19- -X $(repo_name ) /pkg/version.PreflightVersion=$(VERSION ) \
20- -X $(repo_name ) /pkg/version.Commit=$(GITCOMMIT ) \
21- -X $(repo_name ) /pkg/version.BuildDate=$(shell date "+% F-% T-% Z") \
22- -X $(repo_name ) /pkg/client.ClientID=k3TrDbfLhCgnpAbOiiT2kIE1AbovKzjo \
23- -X $(repo_name ) /pkg/client.ClientSecret=f39w_3KT9Vp0VhzcPzvh-uVbudzqCFmHER3Huj0dvHgJwVrjxsoOQPIw_1SDiCfa \
24- -X $(repo_name ) /pkg/client.AuthServerDomain=auth.jetstack.io
22+ -X $(gomodule_name ) /pkg/version.PreflightVersion=$(VERSION ) \
23+ -X $(gomodule_name ) /pkg/version.Commit=$(GITCOMMIT ) \
24+ -X $(gomodule_name ) /pkg/version.BuildDate=$(shell date "+% F-% T-% Z") \
25+ -X $(gomodule_name ) /pkg/client.ClientID=k3TrDbfLhCgnpAbOiiT2kIE1AbovKzjo \
26+ -X $(gomodule_name ) /pkg/client.ClientSecret=f39w_3KT9Vp0VhzcPzvh-uVbudzqCFmHER3Huj0dvHgJwVrjxsoOQPIw_1SDiCfa \
27+ -X $(gomodule_name ) /pkg/client.AuthServerDomain=auth.jetstack.io
2528
2629oci_preflight_base_image_flavor := static
2730oci_preflight_image_name := quay.io/jetstack/venafi-agent
0 commit comments