mirror of
https://github.com/xcp-ng/xcp.git
synced 2026-10-11 22:29:52 +00:00
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]>
34 lines
693 B
Makefile
34 lines
693 B
Makefile
#!/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
|