summaryrefslogtreecommitdiffhomepage
path: root/misc/git_hook/README.md
diff options
context:
space:
mode:
authorFernando Serboncini <fserb@tailscale.com>2026-04-21 13:25:49 -0400
committerFernando Serboncini <fserb@tailscale.com>2026-04-21 13:40:32 -0400
commitb34a1d5f63a150d580645532c39098f0449867e4 (patch)
treea09729b6e42501a7e11e3505a870f26c3f8b795d /misc/git_hook/README.md
parent1669b0d3d48310e970fb55460af34527d7bde602 (diff)
downloadtailscale-fserb/githook-version.tar.xz
tailscale-fserb/githook-version.zip
misc/git_hook: propagate shared HOOK_VERSIONfserb/githook-version
Move HOOK_VERSION into the githook package and export it as githook.HookVersion, so tailscale/corp can reference it via the shared-code bump instead of having to bump HOOK_VERSION by hand. New launcher.sh composes the wanted version from 2 sources: the shared HOOK_VERSION and an optional repo local version, misc/git_hook/HOOK_VERSION, for repo-specific config bumps. Updates tailscale/corp#40381 Change-Id: I7cf16889ba53cb564cc2df7dfd7588748f542c55 Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
Diffstat (limited to 'misc/git_hook/README.md')
-rw-r--r--misc/git_hook/README.md17
1 files changed, 9 insertions, 8 deletions
diff --git a/misc/git_hook/README.md b/misc/git_hook/README.md
index 81c15dc58..49d768937 100644
--- a/misc/git_hook/README.md
+++ b/misc/git_hook/README.md
@@ -22,13 +22,14 @@ script after a built-in hook. For example, put a custom check in
only if the built-in hook succeeds; failure aborts the git operation.
-## Changing the shared code
+## Version bumps
-When you change anything under `githook/` or `launcher.sh`, bump
-`HOOK_VERSION` in the same commit so every dev auto rebuilds on their next
-git operation.
+The launcher rebuilds when the installed binary's version differs from
+the concatenation of two files:
-Because `tailscale/corp` imports `githook/`, also plan the downstream
-update: after landing here, bump corp's `tailscale.com` dependency and
-bump corp's own `misc/git_hook/HOOK_VERSION` on a separate commit. Both are
-required.
+* `githook/HOOK_VERSION` (shared): bump when changing anything under
+ `githook/` or `git-hook.go`. Downstream repos pick it up after
+ bumping their `tailscale.com` dependency.
+* `misc/git_hook/HOOK_VERSION` (repo-local, optional): bump to force a
+ rebuild for repo-specific config changes without touching the shared
+ version. This repo does not use one.