ComputationalProteomicsUnit / maker

Makefile for R packages
GNU General Public License v3.0
31 stars 5 forks source link

Add basic git hooks #31

Closed sgibb closed 6 years ago

sgibb commented 6 years ago

This PR allows you to call make PKG=MSnbase setup-git-hooks (see #30). It will create a .git/hooks/pre-commit file if it doesn't exist. Then it calls the hooks from ${MAKERDIR}/hooks. The advantage is that we just have one place to maintain all hooks for all R based git projects. The disadvantage of the current solution is that you don't have the choice to use just a specific hook (ok, you could add/remove the specific line in your .git/hooks/pre-commit manually).

The first hooks:

  1. Convert issue numbers in NEWS.md to github links.
  2. Create NEWS from NEWS.md.
  3. Abort git commit if the README.Rmd was updated but the README.md is still the old one.

What do you think?