Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Remove hack/tools go module #1753

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ COPY go.mod go.mod
COPY go.sum go.sum
COPY apis/go.mod apis/go.mod
COPY apis/go.sum apis/go.sum
COPY hack/tools/go.mod hack/tools/go.mod
COPY hack/tools/go.sum hack/tools/go.sum
COPY pkg/hardwareutils/go.mod pkg/hardwareutils/go.mod
COPY pkg/hardwareutils/go.sum pkg/hardwareutils/go.sum
RUN go mod download
Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
# instead of storing it
#
#
BIN_DIR := bin
TOOLS_DIR := hack/tools
TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/$(BIN_DIR))
TOOLS_BIN_DIR := $(abspath tools/bin)

CRD_OPTIONS ?= "crd:allowDangerousTypes=true,crdVersions=v1"
KUSTOMIZE = tools/bin/kustomize
KUSTOMIZE_PKG=sigs.k8s.io/kustomize/kustomize/v4
KUSTOMIZE_VER = v4.5.7

CONTROLLER_GEN = tools/bin/controller-gen
CONTROLLER_GEN_PKG = sigs.k8s.io/controller-tools/cmd/controller-gen
CONTROLLER_GEN_VER = v0.12.1
GINKGO = tools/bin/ginkgo
GINKGO_VER = v2.17.1

Expand Down Expand Up @@ -187,11 +190,11 @@ deploy: $(KUSTOMIZE) manifests ## Deploy controller in the configured Kubernete
make set-manifest-image-bmo MANIFEST_IMG=$(IMG_NAME) MANIFEST_TAG=$(IMG_TAG)
$< build config/default | kubectl apply -f -

$(CONTROLLER_GEN): hack/tools/go.mod
cd hack/tools; go build -o $(abspath $@) sigs.k8s.io/controller-tools/cmd/controller-gen
$(CONTROLLER_GEN):
GOBIN=$(TOOLS_BIN_DIR) go install $(CONTROLLER_GEN_PKG)@$(CONTROLLER_GEN_VER)

$(KUSTOMIZE): hack/tools/go.mod
cd hack/tools; go build -o $(abspath $@) sigs.k8s.io/kustomize/kustomize/v4
$(KUSTOMIZE):
GOBIN=$(TOOLS_BIN_DIR) go install $(KUSTOMIZE_PKG)@$(KUSTOMIZE_VER)

.PHONY: build-e2e
build-e2e:
Expand Down Expand Up @@ -315,8 +318,6 @@ mod: ## Clean up go module settings
cd apis; go mod verify
cd pkg/hardwareutils; go mod tidy
cd pkg/hardwareutils; go mod verify
cd hack/tools; go mod tidy
cd hack/tools; go mod verify
cd test; go mod tidy
cd test; go mod verify

Expand Down
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This triggers two things:

We also need to create one or more tags for the Go modules ecosystem:

- For any subdirectory with `go.mod` in it (excluding `hack/tools`), create
- For any subdirectory with `go.mod` in it, create
another Git tag with directory prefix, ie. `git tag apis/v0.x.y`,
`git tag test/v0.x.y` and `git tag pkg/hardwareutils/v0.x.y`. This enables the
tags to be used as a Gomodule version for any downstream users. **NOTE**: Do
Expand Down
70 changes: 0 additions & 70 deletions hack/tools/go.mod

This file was deleted.

Loading