frostfs-api/Makefile
Vitaliy Potyarkin 4c51a9b9d6
All checks were successful
Formatters / Run fmt (pull_request) Successful in 28s
DCO action / DCO (pull_request) Successful in 1m3s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m5s
[#71] Stop using obsolete .github directory
This commit is a part of multi-repo cleanup effort:
TrueCloudLab/frostfs-infra#136

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-11-06 15:10:17 +03:00

35 lines
813 B
Makefile
Executable file

#!/usr/bin/make -f
SHELL=bash
include help.mk
.PHONY: doc fmt pre-commit unpre-commit pre-commit-run
# Regenerate documentation for proto files:
doc:
@for f in `find . -type f -name '*.proto' -exec dirname {} \; | sort -u `; do \
echo "⇒ Documentation for $$(basename $$f)"; \
protoc \
--doc_opt=.forgejo/markdown.tmpl,$${f}.md \
--proto_path=.:/usr/local/include \
--doc_out=proto-docs/ $${f}/*.proto; \
done
# Run clang-format
fmt:
@for f in `ls **/*.proto`; do \
echo "⇒ Formatting $$f"; \
clang-format -i $$f; \
done
# Activate pre-commit hooks
pre-commit:
pre-commit install --hook-type pre-commit
# Deactivate pre-commit hooks
unpre-commit:
pre-commit uninstall --hook-type pre-commit
# Run pre-commit hooks
pre-commit-run:
@pre-commit run --all-files --hook-stage manual