Skip to content

Commit 0da7ea3

Browse files
authored
updating dependencies to latest allowable version(s) (#6951)
Signed-off-by: Adam D. Cornett <adc@redhat.com>
1 parent e5e6da0 commit 0da7ea3

File tree

4 files changed

+332
-173
lines changed

4 files changed

+332
-173
lines changed

.goreleaser.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ env:
44
- GO111MODULE=on
55
- GOPROXY=https://proxy.golang.org|direct
66
- REPO=github.com/operator-framework/operator-sdk
7+
- GO_BUILD_TAGS=containers_image_openpgp
78

89
# Hooks to run before any build is run.
910
before:
@@ -18,6 +19,9 @@ builds:
1819
main: ./cmd/operator-sdk
1920
binary: operator-sdk
2021
mod_timestamp: "{{ .CommitTimestamp }}"
22+
# containers_image_openpgp for containers/image
23+
flags: &build-flags
24+
- -tags=containers_image_openpgp
2125
asmflags: &build-asmflags
2226
- all=-trimpath={{ .Env.PWD }}
2327
gcflags: &build-gcflags
@@ -41,6 +45,7 @@ builds:
4145
main: ./cmd/helm-operator
4246
binary: helm-operator
4347
mod_timestamp: "{{ .CommitTimestamp }}"
48+
flags: *build-flags
4449
asmflags: *build-asmflags
4550
gcflags: *build-gcflags
4651
ldflags: *build-ldflags

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ GO_BUILD_ARGS = \
2828
-X '$(REPO)/internal/version.KubernetesVersion=v$(K8S_VERSION)' \
2929
-X '$(REPO)/internal/version.ImageVersion=$(IMAGE_VERSION)' \
3030
" \
31+
# containers_image_openpgp for containers/image
32+
GO_BUILD_TAGS = containers_image_openpgp
3133

3234
export GO111MODULE = on
3335
export CGO_ENABLED = 0
@@ -39,7 +41,7 @@ export PATH := $(PWD)/$(BUILD_DIR):$(PWD)/$(TOOLS_DIR):$(PATH)
3941
generate: build # Generate CLI docs and samples
4042
rm -rf testdata
4143
$(GO) run ./hack/generate/cncf-maintainers/main.go
42-
$(GO) run ./hack/generate/cli-doc/gen-cli-doc.go
44+
$(GO) run -tags=$(GO_BUILD_TAGS) ./hack/generate/cli-doc/gen-cli-doc.go
4345
$(GO) run ./hack/generate/samples/generate_testdata.go
4446
$(GO) generate ./...
4547

@@ -54,15 +56,15 @@ fix: ## Fixup files in the repo.
5456
$(GO) mod tidy
5557
$(GO) fmt ./...
5658
make setup-lint
57-
$(TOOLS_DIR)/golangci-lint run --fix
59+
$(TOOLS_DIR)/golangci-lint run --fix --build-tags $(GO_BUILD_TAGS)
5860

5961
.PHONY: setup-lint
6062
setup-lint: ## Setup the lint
6163
$(SCRIPTS_DIR)/fetch golangci-lint 1.64.8
6264

6365
.PHONY: lint
6466
lint: setup-lint ## Run the lint check
65-
$(TOOLS_DIR)/golangci-lint run
67+
$(TOOLS_DIR)/golangci-lint run --build-tags $(GO_BUILD_TAGS)
6668

6769

6870
.PHONY: clean
@@ -89,11 +91,11 @@ install: ## Install operator-sdk and helm-operator.
8991
.PHONY: build
9092
build: ## Build operator-sdk and helm-operator.
9193
@mkdir -p $(BUILD_DIR)
92-
$(GO) build $(GO_BUILD_ARGS) -o $(BUILD_DIR) ./cmd/{operator-sdk,helm-operator}
94+
$(GO) build $(GO_BUILD_ARGS) -tags=$(GO_BUILD_TAGS) -o $(BUILD_DIR) ./cmd/{operator-sdk,helm-operator}
9395

9496
.PHONY: build/operator-sdk build/helm-operator
9597
build/operator-sdk build/helm-operator:
96-
$(GO) build $(GO_BUILD_ARGS) -o $(BUILD_DIR)/$(@F) ./cmd/$(@F)
98+
$(GO) build $(GO_BUILD_ARGS) -tags=$(GO_BUILD_TAGS) -o $(BUILD_DIR)/$(@F) ./cmd/$(@F)
9799

98100
# Build scorecard binaries.
99101
.PHONY: build/scorecard-test build/scorecard-test-kuttl build/custom-scorecard-tests
@@ -151,7 +153,7 @@ test-sanity: generate fix ## Test repo formatting, linting, etc.
151153
git diff --exit-code # fast-fail if generate or fix produced changes
152154
./hack/check-license.sh
153155
./hack/check-error-log-msg-format.sh
154-
$(GO) vet ./...
156+
$(GO) vet -tags=$(GO_BUILD_TAGS) ./...
155157
make setup-lint
156158
make lint
157159
git diff --exit-code # diff again to ensure other checks don't change repo
@@ -165,7 +167,7 @@ test-docs: ## Test doc links
165167
.PHONY: test-unit
166168
TEST_PKGS = $(shell $(GO) list ./... | grep -v -E 'github.com/operator-framework/operator-sdk/test/')
167169
test-unit: ## Run unit tests
168-
$(GO) test -coverprofile=coverage.out -covermode=count -short $(TEST_PKGS)
170+
$(GO) test -tags=$(GO_BUILD_TAGS) -coverprofile=coverage.out -covermode=count -short $(TEST_PKGS)
169171

170172
e2e_tests := test-e2e-go test-e2e-helm test-e2e-integration
171173
e2e_targets := test-e2e $(e2e_tests)

0 commit comments

Comments
 (0)