* Retain full git sha1 instead of the short version
Signed-off-by: Ankit Malpani <malpani@stripe.com>
* Update test to indicate full buildGitRev
Signed-off-by: Ankit Malpani <malpani@stripe.com>
Co-authored-by: Ankit Malpani <malpani@stripe.com>
In our RPM build process, for whatever reason
it builds packages from a .git-less source.
This leads to the buildGit* variables not being set
and the corresponding BuildGit* in /debug/vars being empty.
We can export BUILD_GIT_* environment variables
during the build, though; this would fall back to those
in case the git commands come up empty.
Signed-off-by: Scott Lanning <scott.lanning@booking.com>
This makes it easier to find out where a binary may come from.
Before:
$ vtworker --version
Version: 34c5b80b4 built on Wed Jun 14 22:38:45 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
After:
$ vtworker --version
Version: 30d07ef9a (Git branch 'version_output_fixes') built on Wed Jun 14 22:44:13 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
This will make the --version more readable.
before:
$ vtworker --version
Version: 512ba51169 built on Wed Jun 14 22:30:38 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
after:
$ vtworker --version
Version: 34c5b80b4 built on Wed Jun 14 22:38:45 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
Please refer to #2694 and #2670 for motivation and reasoning for
this change.
I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.
I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.
As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.