[MM-57855] Add manifest validation step (#198)
This commit is contained in:
parent
cb94a72744
commit
4e15acf566
2 changed files with 11 additions and 1 deletions
7
Makefile
7
Makefile
|
@ -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),)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Reference in a new issue