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

Add Git pre-commit and pre-push hooks to Gradle build #87

Merged
merged 7 commits into from
Oct 22, 2019
Merged

Conversation

Aulud
Copy link

@Aulud Aulud commented Oct 15, 2019

Add Git pre-commit and pre-push hooks to Gradle build

Summary: This PR is experimental and may break development workflow. Introduces Git hooks into the development workflow to prevent failed builds on Travis.

Changelog

  • Amend Gradle build file to copy Git hook scripts to ./.git/hooks
    • pre-commit and pre-push scripts will be called respectively prior to making a local commit or pushing to the remote repo
    • A commit or push will only succeed if the script exits without error

Last updated 15 Oct 2019, 7:00PM

@Aulud Aulud requested a review from a team October 15, 2019 11:06
@Aulud
Copy link
Author

Aulud commented Oct 15, 2019

You may have to manually trigger Gradle once for the hooks to be copied into the ./.git/hooks folder. This requires Bash (Git Bash will do).

@daekoon @podocarp Please test if this branch works on Ubuntu 18.04 LTS with Git CLI.

@liakify @JohnNzj Please test if this branch works on Windows with IntelliJ.

config/hooks/pre-commit Outdated Show resolved Hide resolved
config/hooks/pre-push Outdated Show resolved Hide resolved
Copy link

@liakify liakify left a comment

Choose a reason for hiding this comment

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

yes

@Aulud
Copy link
Author

Aulud commented Oct 22, 2019

Merged since there are no objections. Thanks @liakify!

@Aulud Aulud merged commit ccd26cb into master Oct 22, 2019
@Aulud Aulud deleted the add-git-hooks branch October 22, 2019 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants