build: add appinfo xmllint to precommit hook

This commit is contained in:
2026-04-08 00:49:02 +03:00
parent 7d23f076ec
commit d9790a3727
3 changed files with 21 additions and 3 deletions

View File

@@ -279,6 +279,21 @@ test-docker:
echo "\x1b[33mRunning tests in container $$CONTAINER_ID for app $$APP_DIR\x1b[0m"; \
docker exec $$CONTAINER_ID phpunit -c apps-shared/$$APP_DIR/tests/phpunit.docker.xml
info_xsd_url=https://apps.nextcloud.com/schema/apps/info.xsd
info_xsd=$(build_tools_directory)/info.xsd
$(info_xsd):
@mkdir -p $(build_tools_directory)
curl -sS -o $(info_xsd) $(info_xsd_url)
# lint-appinfo:
# - Validate appinfo/info.xml against the Nextcloud App Store XSD schema
.PHONY: lint-appinfo
lint-appinfo: $(info_xsd)
@echo "\x1b[33mValidating appinfo/info.xml against Nextcloud schema...\x1b[0m"
@xmllint --noout --schema $(info_xsd) appinfo/info.xml
@echo "\x1b[32mappinfo/info.xml is valid.\x1b[0m"
# lint:
# - Lint JS via pnpm and PHP via composer script "lint"
.PHONY: lint

View File

@@ -36,13 +36,13 @@ All data is scoped to a house; members only see the houses they belong to.
<dependencies>
<nextcloud min-version="29" max-version="34"/>
</dependencies>
<background-jobs>
<job>OCA\Pantry\BackgroundJob\ReopenRecurringItemsJob</job>
</background-jobs>
<settings>
<admin>OCA\Pantry\Settings\Admin</admin>
<admin-section>OCA\Pantry\Sections\Admin</admin-section>
</settings>
<background-jobs>
<job>OCA\Pantry\BackgroundJob\ReopenRecurringItemsJob</job>
</background-jobs>
<navigations>
<navigation role="all">
<name>Pantry</name>

View File

@@ -20,3 +20,6 @@ pre-commit:
openapi:
glob: "*Controller.php"
run: make openapi && git add openapi.json
lint-appinfo:
glob: "appinfo/info.xml"
run: make lint-appinfo