Skip to content
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
16 changes: 10 additions & 6 deletions openshift/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
BIN_DIR := bin
TOOLS_DIR := tools

include provider-version.mk

$(RELEASE_DIR):
mkdir -p $(RELEASE_DIR)/

MANIFESTS_GEN := go run ./vendor/github.com/openshift/cluster-capi-operator/manifests-gen/

.PHONY: check-env
check-env:
ifndef PROVIDER_VERSION
$(error PROVIDER_VERSION is undefined)
endif
.PHONY: verify
verify: verify-ocp-manifests

.PHONY: verify-%
verify-%: ## Ensure no diff after running some other target
$(MAKE) $*
./verify-diff.sh

.PHONY: update-manifests-gen
update-manifests-gen:
cd tools && go get github.com/openshift/cluster-capi-operator/manifests-gen && go mod tidy && go mod vendor

.PHONY: ocp-manifests
ocp-manifests: $(RELEASE_DIR) check-env ## Builds openshift specific manifests
ocp-manifests: $(RELEASE_DIR) ## Builds openshift specific manifests
# Generate provider manifests.
cd tools && $(MANIFESTS_GEN) --provider-name "aws" --provider-type "InfrastructureProvider" --provider-version "${PROVIDER_VERSION}" --base-path "../../" --manifests-path "../manifests"
2 changes: 2 additions & 0 deletions openshift/provider-version.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file is generated by rebasebot. Do not edit.
PROVIDER_VERSION ?= v2.9.2
11 changes: 11 additions & 0 deletions openshift/verify-diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

FILE_DIFF=$(git ls-files -o --exclude-standard)

if [ "$FILE_DIFF" != "" ]; then
echo "Found untracked files:"
echo "$FILE_DIFF"
exit 1
fi

git diff --exit-code