1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-05 07:46:15 +02:00

docs: validate jsonschema

This commit is contained in:
Carlos Alexandro Becker 2024-01-01 22:22:36 -03:00
parent a117582d8c
commit c6f2eb7008
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
3 changed files with 26 additions and 9 deletions

View File

@ -3,13 +3,13 @@ name: generate
on:
push:
branches:
- 'main'
- "main"
paths:
- '.github/workflows/generate.yml'
- 'www/*'
- 'cmd/*'
- 'internal/cmd/*'
- 'files/*'
- ".github/workflows/generate.yml"
- "www/*"
- "cmd/*"
- "internal/cmd/*"
- "files/*"
workflow_dispatch:
jobs:
@ -23,10 +23,13 @@ jobs:
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: task docs:generate
- run: "go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest"
- run: task docs:releases
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- run: task docs:generate
- run: task schema:generate
- run: task schema:validate
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: update cmd docs"

View File

@ -97,6 +97,22 @@ tasks:
cmds:
- task: ci
schema:generate:
desc: Generate JSONSchema
cmds:
- go run ./cmd/nfpm/ schema -o ./www/docs/static/schema.json
sources:
- nfpm.go
generates:
- ./www/docs/static/schema.json
schema:validate:
desc: Validate JSONSchema
cmds:
- jv ./www/docs/static/schema.json
sources:
- ./www/docs/static/schema.json
docs:generate:
desc: Generate docs
cmds:
@ -104,7 +120,6 @@ tasks:
sources:
- cmd/*.go
- files/*.go
- nfpm.go
- ./scripts/cmd_docs.sh
- CONTRIBUTING.md
generates:

View File

@ -9,7 +9,6 @@ fi
mkdir -p www/docs/cmd
rm -rf www/docs/cmd/*.md
go run ./cmd/nfpm docs
go run ./cmd/nfpm schema -o ./www/docs/static/schema.json
"$SED" \
-i'' \