Makefile: Add helper script for CI or devs

This file will be used by CI (github) to factorize opperations that
can be also run on developer workstation.

Origin: https://github.com/xcp-ng/xcp/pull/803
Signed-off-by: Philippe Coval <[email protected]>
This commit is contained in:
Philippe Coval
2026-04-14 11:42:36 +02:00
parent ee3cfb3312
commit 271edcbc5b
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/make -f
# -*- makefile -*-
# ex: set tabstop=4 noexpandtab:
# -*- coding: utf-8 -*
default: help
jq?=jq --indent 4
help: README.md
@echo "Please read $^"
@echo ""
@head $^
@echo ""
@echo "More details in $^"
setup:
@echo "info: $@: Checking presence of tools if not please install them"
${jq} --version
lint: setup
@echo "info: $@: json files"
find . \
-iname "*_cache" -type d -prune -false \
-o -iname "*.json" -type f \
-print \
| while read file ; do \
${jq} . "$${file}" > "$${file}.tmp" && mv "$${file}.tmp" "$${file}" ; \
done
check: lint
@echo "info: $@: will pass if sources are linted, if not please lint and commit"
git diff --stat --exit-code