-
Notifications
You must be signed in to change notification settings - Fork 19
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
Execute precommit scripts right before the actual commit #26
Comments
Good suggestion. I've been thinking of this as well! Fixed now. Would be great if you could try it out and give feedback! |
Wow, that was quick! Thank you very much. I just saw something that could cause problems in the current implementation. All executions of hook scripts are asynchronous and the process waits for them to finish, except when executing the precommit scripts. In that case there's no callback and the commit is done right after the script execution, what may cause the commit to be done before the precommit scripts. I'll try it out next monday. |
Good work. Thanks! |
It worked great! I created a test project with a npm script to call mversion. In the precommit script I did the build (just copy src/index.js to dist/index.js) add the results to the index and let mversion do the commit. The dist directory was ignored in git so that was the only commit where the contents of dist where actually versioned, so now I have what I wanted. When do you expect to release a new version to npm? |
I'd just like someone other than me to verify #24, and I'll do a minor release. |
If precommit scripts were executed right before the commit (inside the update method, after the clean repo check) we could add files to the commit being created to do things like:
The text was updated successfully, but these errors were encountered: