summaryrefslogtreecommitdiffhomepage
path: root/misc/git_hook/git-hook.go
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/git-hook.go
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/git-hook.go')
-rw-r--r--misc/git_hook/git-hook.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/misc/git_hook/git-hook.go b/misc/git_hook/git-hook.go
index 4af11c065..2cf3ff421 100644
--- a/misc/git_hook/git-hook.go
+++ b/misc/git_hook/git-hook.go
@@ -14,7 +14,6 @@
package main
import (
- _ "embed"
"fmt"
"log"
"os"
@@ -23,9 +22,6 @@ import (
"tailscale.com/misc/git_hook/githook"
)
-//go:embed HOOK_VERSION
-var compiledHookVersion string
-
var pushRemotes = []string{
"git@github.com:tailscale/tailscale",
"git@github.com:tailscale/tailscale.git",
@@ -47,7 +43,7 @@ func main() {
var err error
switch cmd {
case "version":
- fmt.Print(strings.TrimSpace(compiledHookVersion))
+ fmt.Print(strings.TrimSpace(githook.HookVersion) + ":0")
case "install":
err = githook.WriteHooks(hooks)
case "pre-commit":