[MM-57855] Add manifest validation step (#198)

This commit is contained in:
Christopher Poile 2024-04-22 11:03:18 -04:00 committed by GitHub
parent cb94a72744
commit 4e15acf566
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -43,6 +43,11 @@ endif
.PHONY: all
all: check-style test dist
## Ensures the plugin manifest is valid
.PHONY: manifest-check
manifest-check:
./build/bin/manifest check
## Propagates plugin manifest information into the server/ and webapp/ folders.
.PHONY: apply
apply:
@ -56,7 +61,7 @@ install-go-tools:
## Runs eslint and golangci-lint
.PHONY: check-style
check-style: apply webapp/node_modules install-go-tools
check-style: manifest-check apply webapp/node_modules install-go-tools
@echo Checking for style guide compliance
ifneq ($(HAS_WEBAPP),)

View file

@ -86,6 +86,11 @@ func main() {
panic("failed to write manifest to dist directory: " + err.Error())
}
case "check":
if err := manifest.IsValid(); err != nil {
panic("failed to check manifest: " + err.Error())
}
default:
panic("unrecognized command: " + cmd)
}