Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ $(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@echo "(re)installing $(GOBIN)/golangci-lint-v1.64.8"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.64.8 "github.com/golangci/golangci-lint/cmd/golangci-lint"

GORELEASER := $(GOBIN)/goreleaser-v1.26.2
GORELEASER := $(GOBIN)/goreleaser-v2.12.7
$(GORELEASER): $(BINGO_DIR)/goreleaser.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/goreleaser-v1.26.2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN)/goreleaser-v1.26.2 "github.com/goreleaser/goreleaser"
@echo "(re)installing $(GOBIN)/goreleaser-v2.12.7"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN)/goreleaser-v2.12.7 "github.com/goreleaser/goreleaser/v2"

PROTOC_GEN_GO_GRPC := $(GOBIN)/protoc-gen-go-grpc-v1.3.0
$(PROTOC_GEN_GO_GRPC): $(BINGO_DIR)/protoc-gen-go-grpc.mod
Expand Down
4 changes: 2 additions & 2 deletions .bingo/goreleaser.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.22.2
go 1.25.3

require github.com/goreleaser/goreleaser v1.26.2
require github.com/goreleaser/goreleaser/v2 v2.12.7
1,973 changes: 694 additions & 1,279 deletions .bingo/goreleaser.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GINKGO="${GOBIN}/ginkgo-v2.23.4"

GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.64.8"

GORELEASER="${GOBIN}/goreleaser-v1.26.2"
GORELEASER="${GOBIN}/goreleaser-v2.12.7"

PROTOC_GEN_GO_GRPC="${GOBIN}/protoc-gen-go-grpc-v1.3.0"

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ build: clean $(CMDS) $(OPM)
cross: opm_version_flags=-ldflags "-X '$(PKG)/cmd/opm/version.gitCommit=$(GIT_COMMIT)' -X '$(PKG)/cmd/opm/version.opmVersion=$(OPM_VERSION)' -X '$(PKG)/cmd/opm/version.buildDate=$(BUILD_DATE)'"
cross:
ifeq ($(shell go env GOARCH),amd64)
GOOS=darwin CC=o64-clang CXX=o64-clang++ CGO_ENABLED=1 $(GO) build $(opm_version_flags) -tags=$(TAGS) -o "bin/darwin-amd64-opm" --ldflags "-extld=o64-clang" ./cmd/opm
GOOS=darwin CC=o64-clang CXX=o64-clang++ CGO_ENABLED=1 CGO_LDFLAGS='-Wl,-undefined,dynamic_lookup' $(GO) build $(opm_version_flags) -tags=$(TAGS) -o "bin/darwin-amd64-opm" --ldflags "-extld=o64-clang -extldflags=-Wl,-undefined,dynamic_lookup" ./cmd/opm
GOOS=windows CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 $(GO) build $(opm_version_flags) -tags=$(TAGS) -o "bin/windows-amd64-opm" --ldflags "-extld=x86_64-w64-mingw32-gcc" -buildmode=exe ./cmd/opm
endif

Expand Down Expand Up @@ -163,7 +163,7 @@ windows-goreleaser-install:
# This is done to ensure the same version of goreleaser is used across all platforms
mkdir -p $(dir $(GORELEASER))
@echo "(re)installing $(GORELEASER)"
GOWORK=off $(GO) build -mod=mod -modfile=.bingo/goreleaser.mod -o=$(GORELEASER) "github.com/goreleaser/goreleaser"
GOWORK=off $(GO) build -mod=mod -modfile=.bingo/goreleaser.mod -o=$(GORELEASER) "github.com/goreleaser/goreleaser/v2"

# tagged-or-empty returns $(OPM_IMAGE_REPO):$(1) when HEAD is assigned a non-prerelease semver tag,
# otherwise the empty string. An empty string causes goreleaser to skip building
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/operator-framework/operator-registry

go 1.24.6
go 1.25.3

require (
github.com/akrylysov/pogreb v0.10.2
Expand Down
8 changes: 5 additions & 3 deletions release/goreleaser.darwin.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
builds:
- id: darwin-amd64
main: ./cmd/opm
Expand Down Expand Up @@ -36,14 +37,15 @@ builds:
ldflags: *build-ldflags
archives:
- id: opm
builds:
ids:
- darwin-amd64
- darwin-arm64
format: binary
formats:
- binary
name_template: "{{ .Os }}-{{ .Arch }}-{{ .Binary }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Env.OPM_VERSION }}"
version_template: "{{ .Env.OPM_VERSION }}"
release:
disable: true
101 changes: 26 additions & 75 deletions release/goreleaser.linux.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
builds:
- id: linux-amd64
main: ./cmd/opm
Expand Down Expand Up @@ -69,90 +70,40 @@ builds:
ldflags: *build-ldflags
archives:
- id: opm
builds:
ids:
- linux-amd64
- linux-arm64
- linux-ppc64le
- linux-s390x
format: binary
formats:
- binary
name_template: "{{ .Os }}-{{ .Arch }}-{{ .Binary }}"
dockers:
- image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
ids: ["linux-amd64"]
goos: linux
goarch: amd64
dockerfile: release/goreleaser.opm.Dockerfile
extra_files: ["nsswitch.conf"]
use: buildx
build_flag_templates:
- --platform=linux/amd64
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
- image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
ids: ["linux-arm64"]
goos: linux
goarch: arm64
dockerfile: release/goreleaser.opm.Dockerfile
extra_files: ["nsswitch.conf"]
use: buildx
build_flag_templates:
- --platform=linux/arm64
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
- image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
ids: ["linux-ppc64le"]
goos: linux
goarch: ppc64le
dockerfile: release/goreleaser.opm.Dockerfile
extra_files: ["nsswitch.conf"]
use: buildx
build_flag_templates:
- --platform=linux/ppc64le
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
- image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
ids: ["linux-s390x"]
goos: linux
goarch: s390x
dockerfile: release/goreleaser.opm.Dockerfile
extra_files: ["nsswitch.conf"]
use: buildx
build_flag_templates:
- --platform=linux/s390x
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
docker_manifests:
dockers_v2:
# IMAGE_TAG is either set by the Makefile or the goreleaser action workflow,
# This image is intended to be tagged/pushed on all trunk (master, release branch) commits and tags.
- name_template: "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}"
image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
# Release image builds will be skipped if *_IMAGE_OR_EMPTY variables are empty.
# https://github.com/goreleaser/goreleaser/blob/9ed3c0c/internal/pipe/docker/manifest.go#L105
- name_template: "{{ .Env.MAJ_MIN_IMAGE_OR_EMPTY }}"
image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
- name_template: "{{ .Env.MAJ_IMAGE_OR_EMPTY }}"
image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
- name_template: "{{ .Env.LATEST_IMAGE_OR_EMPTY }}"
image_templates:
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
- id: opm-multi-arch
ids:
- linux-amd64
- linux-arm64
- linux-ppc64le
- linux-s390x
dockerfile: release/goreleaser.opm.Dockerfile
extra_files:
- nsswitch.conf
platforms:
- linux/amd64
- linux/arm64
- linux/ppc64le
- linux/s390x
build_args:
GRPC_HEALTH_PROBE_VERSION: "{{ .Env.GRPC_HEALTH_PROBE_VERSION }}"
images:
- "{{ .Env.OPM_IMAGE_REPO }}"
tags:
- "{{ .Env.IMAGE_TAG }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Env.OPM_VERSION }}"
version_template: "{{ .Env.OPM_VERSION }}"
release:
disable: true
8 changes: 5 additions & 3 deletions release/goreleaser.windows.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
builds:
- id: windows-amd64
main: ./cmd/opm
Expand All @@ -23,13 +24,14 @@ builds:
- -X {{ .Env.PKG }}/cmd/opm/version.buildDate={{ .Env.BUILD_DATE }}
archives:
- id: opm
builds:
ids:
- windows-amd64
format: binary
formats:
- binary
name_template: "{{ .Os }}-{{ .Arch }}-{{ .Binary }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Env.OPM_VERSION }}"
version_template: "{{ .Env.OPM_VERSION }}"
release:
disable: true
Loading