Commit f66e8dea authored by Andrew Robert Nicols's avatar Andrew Robert Nicols
Browse files

Add a check to ensure that the all commits are Signed-off-by

This ensures that those using the Makefile to handle their git pushes to
Mahara confirm with the policy on submitting code at

Signed-off-by: default avatarAndrew Robert Nicols <>
parent 8f71e8a2
@echo "Run 'make imageoptim' to losslessly optimise all images"
@echo "Run 'make minaccept' to run the quick pre-commit tests"
@echo "Run 'make checksignoff' to check that your commits are all Signed-off-by"
@echo "Run 'make push' to push your changes to the repo"
......@@ -12,5 +13,16 @@ imageoptim:
@find htdocs/ -type f -name "*.php" | xargs -n 1 -P 2 php -l && echo All good!
@branch=`git status | head -1 | sed 's/.* On branch //'`; \
commits=`git log origin/$$branch.. | grep "^commit" | wc -l`; \
signed=`git log origin/$$branch.. | grep "Signed-off-by: " | wc -l`; \
if test "$$commits" -ne "$$signed"; then \
echo "$$(($$commits - $$signed)) commit(s) on $$branch not signed off ($$signed/$$commits)"; \
false; \
else \
echo "All commits signed!"; \
push: minaccept
git push
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment