feat: JSON Schema validation for metadata.yaml as pre-commit hook
Adds schema/metadata.json (JSON Schema draft-07) as the authoritative schema for all rpms/*/metadata.yaml files. Key constraints: - additionalProperties: false at both the top level and builds items, so unknown fields are rejected outright - name allows dots (fixes neovim-glibc-2.17) - github is optional (fixes claude-code, which has no GitHub repo) - repository enum includes fedora/42, fedora/43, fedora/44 - dist_tag boolean field documented in schema Pre-commit hook (check-jsonschema 0.37.2) runs against every file matching ^rpms/[^/]+/metadata\.yaml$ on every commit. Also fixes rpms/claude-code/metadata.yaml: removes the unknown claude_ai field and normalises field order.
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
arch: amd64
|
||||
builds:
|
||||
- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||
release: 1
|
||||
repository:
|
||||
- almalinux/el8
|
||||
version: 2.1.126
|
||||
- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
release: 1
|
||||
repository:
|
||||
- almalinux/el9
|
||||
version: 2.1.126
|
||||
claude_ai: true
|
||||
name: claude-code
|
||||
description: Claude Code - Anthropic's agentic AI coding tool
|
||||
arch: amd64
|
||||
platform: linux
|
||||
maintainer: Anthropic
|
||||
homepage: https://claude.ai/code
|
||||
license: Proprietary
|
||||
maintainer: Anthropic
|
||||
name: claude-code
|
||||
platform: linux
|
||||
builds:
|
||||
- repository:
|
||||
- almalinux/el8
|
||||
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||
release: 1
|
||||
version: 2.1.126
|
||||
- repository:
|
||||
- almalinux/el9
|
||||
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
release: 1
|
||||
version: 2.1.126
|
||||
|
||||
Reference in New Issue
Block a user