Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Install pre-commit githook on make run #504

Merged
merged 1 commit into from
Nov 23, 2015

Conversation

ehg
Copy link
Member

@ehg ehg commented Nov 23, 2015

The rationale for this is that we'd like more exposure for the GPLv2 contribution notice. Installing them on make run seems like a good way to do this.

The way that bin/pre-commit is set up now, this will also force the running of i18nlint and eslint checks. Which is a Good Thing in any case.

Of course, these checks can be bypassed using git commit --no-verify

To test:

  • Delete the existing symlink: rm .git/hooks/pre-commit
  • Restart make run, check that the .git/hooks/pre-commit symlink is reinstated

/cc @rralian

@ehg ehg added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Build labels Nov 23, 2015
@ehg ehg self-assigned this Nov 23, 2015
@@ -44,7 +44,7 @@ export NODE_PATH := server:shared:$(THIS_DIR)
install: node_modules

# Simply running `make run` will spawn the Node.js server instance.
run: install build
run: githooks-commit install build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should just be githooks. We have both pre-commit and pre-push githooks, and githooks should install both of them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how slow our test suite is, I opted for just the pre-commit. I suppose we could require the pre-push as well —maybe it'll force us to improve the tests…

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fair enough... then let's run with this.

@rralian rralian added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 23, 2015
@rralian
Copy link
Contributor

rralian commented Nov 23, 2015

👍

The rationale for this is that we'd like more exposure for the GPLv2
contribution notice. Installing them on `make run` seems like a good way
to do this.

The way that `bin/pre-commit` is set up now, this
will also force the running of i18nlint and eslint checks. Which is a
Good Thing in any case.

Of course, these checks can be bypassed using `git commit --no-verify`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants