Skip to content

Commit

Permalink
Merge pull request #56 from fluxcd/controller-gen-fix
Browse files Browse the repository at this point in the history
Make various make targets work after api pkg change
  • Loading branch information
hiddeco authored Aug 20, 2020
2 parents ade8645 + ea07f5e commit 27a8da8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Image URL to use all building/pushing image targets
IMG ?= fluxcd/helm-controller:latest
# Produce CRDs that work back to Kubernetes 1.16
Expand All @@ -15,7 +14,7 @@ all: manager

# Run tests
test: generate fmt vet manifests api-docs
go test ./... -coverprofile cover.out
find . -maxdepth 2 -type f -name 'go.mod' -execdir go test ./... \;

# Build manager binary
manager: generate fmt vet
Expand Down Expand Up @@ -54,23 +53,23 @@ dev-cleanup: manifests

# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./..." output:crd:artifacts:config=config/crd/bases
cd api; $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./..." output:crd:artifacts:config="../config/crd/bases"

# Generate API reference documentation
api-docs: gen-crd-api-reference-docs
$(API_REF_GEN) -api-dir=./api/v2alpha1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/helmrelease.md

# Run go fmt against code
fmt:
go fmt ./...
find . -maxdepth 2 -type f -name 'go.mod' -execdir go fmt ./... \;

# Run go vet against code
vet:
go vet ./...
find . -maxdepth 2 -type f -name 'go.mod' -execdir go vet ./... \;

# Generate code
generate: controller-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
cd api; $(CONTROLLER_GEN) object:headerFile="../hack/boilerplate.go.txt" paths="./..."

# Build the docker image
docker-build: test
Expand Down

0 comments on commit 27a8da8

Please sign in to comment.