-
Notifications
You must be signed in to change notification settings - Fork 38
NO-ISSUE: Add verify bindata #441
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ TOOLS_BIN_DIR := $(CURDIR)/bin | |
|
|
||
| #SECTION Development | ||
| .PHONY: verify #HELP To verify the code | ||
| verify: tidy fmt vet lint | ||
| verify: tidy fmt vet lint verify-metadata | ||
|
|
||
| .PHONY: tidy #HELP Run go mod tidy. | ||
| tidy: | ||
|
|
@@ -84,12 +84,12 @@ pkg/bindata/catalog/catalog.go: $(shell find testdata/catalog -type f) | |
| # It prevents various FIPS compliance policies from being applied to this compilation. | ||
| # Do not set globally. | ||
| .PHONY: build | ||
| build: bindata #HELP Build the extended tests binary | ||
| build: #HELP Build the extended tests binary | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might cause a conflict with #438, which we are prioritizing.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is fine we can wait that one get merged
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #438 is merged |
||
| @mkdir -p $(TOOLS_BIN_DIR) | ||
| GO_COMPLIANCE_POLICY="exempt_all" go build -ldflags "$(LDFLAGS)" -mod=vendor -o $(TOOLS_BIN_DIR)/olmv1-tests-ext ./cmd/... | ||
|
|
||
| .PHONY: update-metadata | ||
| update-metadata: #HELP Build and run 'update-metadata' to generate test metadata | ||
| update-metadata: build bindata #HELP Build and run 'update-metadata' to generate test metadata | ||
| $(TOOLS_BIN_DIR)/olmv1-tests-ext update --component openshift:payload:olmv1 | ||
| $(MAKE) clean-metadata | ||
|
|
||
|
|
@@ -142,9 +142,10 @@ clean-metadata: #HELP Remove 'codeLocations' from metadata JSON | |
| @echo "Cleaning metadata (removing codeLocations)..." | ||
| @jq 'map(del(.codeLocations))' $(METADATA) > $(METADATA).tmp && mv $(METADATA).tmp $(METADATA) | ||
|
|
||
| .PHONY: verify-metadata #HELP To verify that the metadata was properly update | ||
| .PHONY: verify-metadata #HELP To verify that the metadata and bindata was properly update | ||
| verify-metadata: update-metadata | ||
| @if ! git diff --exit-code $(METADATA); then \ | ||
| @if ! git diff --exit-code >&/dev/null; then \ | ||
| echo "ERROR: Metadata is out of date. Please run 'make build-update' and commit the result."; \ | ||
| exit 1; \ | ||
| fi | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelanford commented on PR439, that this should have
git diff --exit-codeas part of this recipe.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has
@if ! git diff --exit-code >&/dev/null;There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that should not be buried in verify-manifests