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

feat:add embedded-resources target in Makefile #233

Merged
merged 2 commits into from
May 1, 2024
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
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LD_FLAGS=-ldflags " \
OUT_FILE ?= idpbuilder

.PHONY: build
build: manifests generate fmt vet
build: manifests generate fmt vet embedded-resources
go build $(LD_FLAGS) -o $(OUT_FILE) main.go

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
Expand Down Expand Up @@ -60,3 +60,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: embedded-resources
embedded-resources:
./hack/embedded-resources.sh
11 changes: 11 additions & 0 deletions hack/embedded-resources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

DIRECTORIES='argo-cd gitea ingress-nginx'

for dir in $DIRECTORIES; do
./hack/$dir/generate-manifests.sh;
if [[ $? -ne 0 ]]; then
echo "error running script: ./hack/$dir/generate-manifests.sh"
exit 1
fi
done
Loading