Skip to content

Commit

Permalink
install yq at target level
Browse files Browse the repository at this point in the history
Signed-off-by: ehearneredhat <[email protected]>
  • Loading branch information
ehearneRedHat committed Aug 22, 2024
1 parent b2311c1 commit 2164661
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ help:

##@ Dependencies

YQ=$(PROJECT_DIR)/bin/yq
YQ_VERSION := v4.34.2
$(YQ):
$(call go-get-tool,$(YQ),github.com/mikefarah/yq/v4@$(YQ_VERSION))

.PHONY: yq
yq: $(YQ) ## Download yq locally if necessary.
YQ = $(PROJECT_DIR)/bin/yq
yq: ## Download yq locally if necessary.
$(call go-get-tool,$(YQ),github.com/mikefarah/yq/[email protected])

CONTROLLER_GEN = $(PROJECT_DIR)/bin/controller-gen
controller-gen: ## Installs controller-gen in $PROJECT_DIR/bin
Expand Down Expand Up @@ -118,14 +114,16 @@ generate: vendor controller-gen ## Generates types deepcopy code
manifests: controller-gen kustomize ## Generates the manifests in $PROJECT_DIR/install
controller-gen crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=install/crd output:rbac:artifacts:config=install/rbac && $(KUSTOMIZE) build install > $(AUTHORINO_MANIFESTS)
$(MAKE) patch-webhook


run: yq
run:$(shell $(PROJECT_DIR)/hack/check-version.sh)
run:version=$(shell $(YQ) '.build.version' build.yaml)
run:git_sha=$(shell git rev-parse HEAD)
run:dirty=$(shell $(PROJECT_DIR)/hack/check-git-dirty.sh || echo "unknown")
run: generate manifests ## Runs the application against the Kubernetes cluster configured in ~/.kube/config
go run -ldflags "-X main.version=$(version) -X main.gitSHA=${git_sha} -X main.dirty=${dirty}" ./main.go server

build: yq
build:$(shell $(PROJECT_DIR)/hack/check-version.sh)
build:version=$(shell $(YQ) '.build.version' build.yaml)
build:git_sha=$(shell git rev-parse HEAD)
Expand All @@ -142,6 +140,7 @@ IMAGE_TAG=local
endif
AUTHORINO_IMAGE ?= $(IMAGE_REPO):$(IMAGE_TAG)

docker-build: yq
docker-build:$(shell $(PROJECT_DIR)/hack/check-version.sh)
docker-build:version=$(shell $(YQ) '.build.version' build.yaml)
docker-build:git_sha=$(shell git rev-parse HEAD)
Expand Down

0 comments on commit 2164661

Please sign in to comment.