Skip to content
Merged
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
74 changes: 55 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
SHELL := /usr/bin/env bash -o pipefail
.SHELLFLAGS := -ec

# NOTE: This Makefile contains stub targets. Go packages and real build/lint
# targets will be added in a subsequent PR. All targets pass so that CI is
# green while the repository is being bootstrapped.
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
BIN_DIR := $(ROOT_DIR)/bin

GOLANG_VERSION := $(shell sed -En 's/^go (.*)$$/\1/p' "go.mod")

# bingo manages consistent tooling versions.
include .bingo/Variables.mk

# Output paths for compiled CLI binaries
MIGRATE_OPERATORS_BIN := $(BIN_DIR)/migrate-operators-v0-to-v1
MIGRATE_CATALOGS_BIN := $(BIN_DIR)/migrate-catalogs-v0-to-v1

##@ General

Expand All @@ -13,33 +21,61 @@ help: ## Display this help message

##@ Build

.PHONY: build build-all
build build-all: ## Build CLIs (stub: no packages yet)
@echo "Nothing to build — Go packages will be added in a subsequent PR."
.PHONY: build
build: build-migrate-operators build-migrate-catalogs ## Build both CLI binaries into bin/

.PHONY: build-migrate-operators
build-migrate-operators: ## Build migrate-operators-v0-to-v1 into bin/
@mkdir -p $(BIN_DIR)
go build -o $(MIGRATE_OPERATORS_BIN) ./migration/examples/cmd/migrate-operators-v0-to-v1

.PHONY: build-migrate-catalogs
build-migrate-catalogs: ## Build migrate-catalogs-v0-to-v1 into bin/
@mkdir -p $(BIN_DIR)
go build -o $(MIGRATE_CATALOGS_BIN) ./migration/examples/cmd/migrate-catalogs-v0-to-v1

.PHONY: build-all
build-all: ## Build and verify all packages (library + CLIs)
go build ./...

##@ Test

.PHONY: test test-verbose
test test-verbose: ## Run unit tests (stub: no packages yet)
@echo "Nothing to test — Go packages will be added in a subsequent PR."
.PHONY: test
test: ## Run unit tests
go test ./... -count=1

.PHONY: test-verbose
test-verbose: ## Run unit tests with verbose output
go test ./... -v -count=1

##@ Lint & Verify

.PHONY: lint fmt vet tidy verify api-diff
fmt vet tidy: ## No-op stubs until Go packages are present
@echo "Nothing to format/vet/tidy — Go packages will be added in a subsequent PR."
.PHONY: lint
lint: $(GOLANGCI_LINT) ## Run golangci-lint
$(GOLANGCI_LINT) run ./...

.PHONY: fmt
fmt: ## Run gofmt
go fmt ./...

.PHONY: vet
vet: ## Run go vet
go vet ./...

lint: ## No-op stub until Go packages are present
@echo "Nothing to lint — Go packages will be added in a subsequent PR."
.PHONY: tidy
tidy: ## Run go mod tidy
go mod tidy

verify: fmt vet tidy lint ## Run all verification steps (stub)
@echo "Nothing to verify — Go packages will be added in a subsequent PR."
.PHONY: verify
verify: tidy fmt vet lint ## Run all verification steps (tidy, fmt, vet, lint)
@git diff --exit-code || (echo "Files modified by verify — please commit the changes" && exit 1)

api-diff: ## Check for breaking API changes (stub: no packages yet)
@echo "Nothing to diff — Go packages will be added in a subsequent PR."
.PHONY: api-diff
api-diff: $(GO_APIDIFF) ## Check for breaking API changes against origin/main
$(GO_APIDIFF) origin/main --repo-path=. --print-compatible

##@ Clean

.PHONY: clean
clean: ## Remove built binaries from bin/
@rm -rf bin/
rm -f $(MIGRATE_OPERATORS_BIN) $(MIGRATE_CATALOGS_BIN)
59 changes: 59 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
module github.com/operator-framework/library-olm

go 1.26.5

require (
github.com/operator-framework/api v0.45.0
github.com/operator-framework/operator-controller v1.11.0
k8s.io/api v0.36.2
k8s.io/apiextensions-apiserver v0.36.2
k8s.io/apimachinery v0.36.2
k8s.io/client-go v0.36.2
k8s.io/utils v0.0.0-20260626114624-be93311217bd
sigs.k8s.io/controller-runtime v0.24.1
sigs.k8s.io/yaml v1.6.0
)

require (
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fxamacker/cbor/v2 v2.9.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-openapi/jsonpointer v0.23.1 // indirect
github.com/go-openapi/jsonreference v0.21.6 // indirect
github.com/go-openapi/swag v0.26.0 // indirect
github.com/go-openapi/swag/cmdutils v0.26.0 // indirect
github.com/go-openapi/swag/conv v0.26.0 // indirect
github.com/go-openapi/swag/fileutils v0.26.0 // indirect
github.com/go-openapi/swag/jsonname v0.26.0 // indirect
github.com/go-openapi/swag/jsonutils v0.26.0 // indirect
github.com/go-openapi/swag/loading v0.26.0 // indirect
github.com/go-openapi/swag/mangling v0.26.0 // indirect
github.com/go-openapi/swag/netutils v0.26.0 // indirect
github.com/go-openapi/swag/stringutils v0.26.0 // indirect
github.com/go-openapi/swag/typeutils v0.26.0 // indirect
github.com/go-openapi/swag/yamlutils v0.26.0 // indirect
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.57.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/term v0.45.0 // indirect
golang.org/x/text v0.40.0 // indirect
golang.org/x/time v0.15.0 // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260520065146-aa012df4f4af // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect
)
Loading
Loading