mirror of
https://github.com/tailscale/tailscale.git
synced 2026-04-23 14:32:29 +02:00
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>
22 lines
433 B
Go
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)
|
|
}
|
|
}
|