When building with redo, also include the git commit hash
from the proprietary repo, so that we have a precise commit
that identifies all build info (including Go toolchain version).
Add a top-level build script demonstrating to downstream distros
how to burn the right information into builds.
Adjust `tailscale version` to print commit hashes when available.
Fixes#841.
Signed-off-by: David Anderson <danderson@tailscale.com>
staticcheck defaults to running with no tags set, which only
works if redo hasn't run and generated ver.go. If it has,
we end up with a redeclaration conflict.
Signed-off-by: David Anderson <dave@natulte.net>