tailscale/misc/install-git-hooks.go
Fernando Serboncini 514d7d28e7
misc/git_hook: extract shared githook package; auto-rebuild on version bump (#19440)
Pull the hook logic into a reusable githook library package so
tailscale/corp can share it via a thin wrapper main instead of
keeping a forked copy in sync.

The install flow also changes: a wrapper scripts now build the
binary and reinstall the git hooks. Pulling new shared code no
longer requires re-running the installer.

Updates tailscale/corp#39860

Change-Id: I4d606d11c8c883015c190c54e3387a7f9fe4dd32

Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
2026-04-17 16:24:39 -04:00

22 lines
433 B
Go

// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//go:build ignore
// The install-git-hooks program installs git hooks by delegating to
// githook.Install. See that function's doc for what it does.
package main
import (
"log"
"tailscale.com/misc/git_hook/githook"
)
func main() {
log.SetFlags(0)
if err := githook.Install(); err != nil {
log.Fatalf("install-git-hooks: %v", err)
}
}