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

Wrong documentation related to running a custom Git Push command #1091

Closed
lhnrd opened this issue Apr 3, 2024 · 4 comments
Closed

Wrong documentation related to running a custom Git Push command #1091

lhnrd opened this issue Apr 3, 2024 · 4 comments

Comments

@lhnrd
Copy link

lhnrd commented Apr 3, 2024

In this section it mentions that I can use after:git:release to execute a custom git push.

https://github.com/release-it/release-it/blob/c2230713ddaa4adce2b586a241c16e7e69fe8936/docs/git.md#further-customizations

{
  "git": {
    "push": false
  },
  "hooks": {
    "after:git:release": "git push origin HEAD"
  }
}

But then in this one https://github.com/release-it/release-it#hooks it says the after:git:release hook is not execute if push is disabled.

Note that hooks like after:git:release will not run when either the git push failed, or when it is configured not to be executed (e.g. git.push: false). See execution order for more details on execution order of plugin lifecycle methods.

Am I missing something here or is this wrong?

@webpro
Copy link
Collaborator

webpro commented Apr 5, 2024

Do you mean that the docs are wrong or not clear, or is something not actually working as expected?

@lhnrd
Copy link
Author

lhnrd commented Apr 5, 2024

I think the docs are wrong, as it shows an example of using after:git:release to be able to use a custom push, even though this hook does not get executed when git.push is disabled. At least I encountered this problem when using it, but wanted to ask first before opening a PR cause I might be using it wrong.

@webpro webpro closed this as completed in 6df6656 May 8, 2024
@webpro
Copy link
Collaborator

webpro commented May 8, 2024

Thanks for the call, @lhrinaldi, I've changed the docs.

@webpro
Copy link
Collaborator

webpro commented May 20, 2024

🚀 This issue has been resolved in v17.3.0. See Release 17.3.0 for release notes.

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

No branches or pull requests

2 participants