Skip to content
Closed
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
11 changes: 6 additions & 5 deletions openshift/tests-extension/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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-code as part of this recipe.

Copy link
Contributor Author

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;

Copy link
Member

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


.PHONY: tidy #HELP Run go mod tidy.
tidy:
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause a conflict with #438, which we are prioritizing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fine we can wait that one get merged

Copy link
Contributor

Choose a reason for hiding this comment

The 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

Expand Down Expand Up @@ -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