Skip to content

Adds hook to catch tags that don't match project version#20

Merged
Tomaz-Vieira merged 1 commit intokreshuklab:masterfrom
Tomaz-Vieira:git_hooks
Sep 4, 2025
Merged

Adds hook to catch tags that don't match project version#20
Tomaz-Vieira merged 1 commit intokreshuklab:masterfrom
Tomaz-Vieira:git_hooks

Conversation

@Tomaz-Vieira
Copy link
Copy Markdown
Collaborator

@Tomaz-Vieira Tomaz-Vieira commented Sep 4, 2025

Adds a pre-push hook to catch when tags are being pushed when they don't match the project version. The hooks live in git_hooks, which should be linked as .git/hooks. On execution, they run

cargo run -p hooks_executable -- $THE_HOOK_NAME

and the executable switches logic on the hook name. Adding hooks is a matter of implementing them in the hook_executable crate and creating the symlink with the appropriate hook name in git_hooks/

Adds a pre-push hook to catch when tags are being pushed when they don't
match the project version. The hooks live in `git_hooks`, which should
be linked as `.git/hooks`. ON execution, the run

`cargo run -p hooks_executable -- $THE_HOOK_NAME`

and the executable switches logic on the hook name. Adding hooks is
a matter of implementing them in hook_executable and creating the
sylink with the appropriate hook name in `git_hooks/`
@Tomaz-Vieira Tomaz-Vieira merged commit 344b53c into kreshuklab:master Sep 4, 2025
4 checks passed
@Tomaz-Vieira Tomaz-Vieira deleted the git_hooks branch September 4, 2025 14:10
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.

1 participant