Skip to content

Commit 3e0e848

Browse files
committed
Adding the ability to (re-)create the ReleasePayload CRD
rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent 42530bf commit 3e0e848

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ verify-codegen-script:
3030

3131
# Ensure codegen is run before generating the CRD, so updates to Godoc are included.
3232
update-crd: update-codegen-script update-codegen-crds
33+
.PHONY: update-crd
34+
35+
# Create CRD from scratch using the 'crd' generator instead of 'schemapatch'
36+
# This target can regenerate the CRD even if it doesn't exist, unlike update-crd
37+
# which uses 'schemapatch' and only patches existing CRDs.
38+
create-crd: update-codegen-script ensure-controller-gen
39+
'$(CONTROLLER_GEN)' \
40+
crd \
41+
paths="./pkg/apis/release/v1alpha1" \
42+
'output:crd:dir=./artifacts'
43+
.PHONY: create-crd
3344

3445
sonar-reports:
3546
go test ./... -coverprofile=coverage.out -covermode=count -json > report.json

0 commit comments

Comments
 (0)