mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 19:08:41 +00:00

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>
13 lines
383 B
Plaintext
13 lines
383 B
Plaintext
redo-ifchange long.txt short.txt gitcommit.txt extragitcommit.txt ver.go.in
|
|
|
|
read -r LONGVER <long.txt
|
|
read -r SHORTVER <short.txt
|
|
read -r GITCOMMIT <gitcommit.txt
|
|
read -r EXTRAGITCOMMIT <extragitcommit.txt
|
|
|
|
sed -e "s/{LONGVER}/$LONGVER/g" \
|
|
-e "s/{SHORTVER}/$SHORTVER/g" \
|
|
-e "s/{GITCOMMIT}/$GITCOMMIT/g" \
|
|
-e "s/{EXTRAGITCOMMIT}/$EXTRAGITCOMMIT/g" \
|
|
<ver.go.in >$3
|