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

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
http://wiki.mahara.org/index.php?title=Developer_Area/Contributing_CodeSigned-off-by: 's avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
parent 8f71e8a2
all:
@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"
imageoptim:
......@@ -12,5 +13,16 @@ imageoptim:
minaccept:
@find htdocs/ -type f -name "*.php" | xargs -n 1 -P 2 php -l && echo All good!
checksignoff:
@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!"; \
fi
push: minaccept
git push
Markdown is supported
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