Merge pull request #55494 from david-mcmahon/automated-cherry-pick-of-#55353-upstream-release-1.7

Automatic merge from submit-queue.

Automated cherry pick of #55353

Cherry pick of #55353 on release-1.7.

#55353: Capture git export-subst strings in version.sh for 'git

Kubernetes-commit: fd4d97d2fb5feb1642db7600d81aea90aee55c03
This commit is contained in:
Kubernetes Publisher
2017-11-13 15:16:21 -08:00

View File

@@ -51,9 +51,13 @@ var (
// semantic version is a git hash, but the version itself is no
// longer the direct output of "git describe", but a slight
// translation to be semver compliant.
// NOTE: The $Format strings are replaced during 'git archive' thanks to the
// companion .gitattributes file containing 'export-subst' in this same
// directory. See also https://git-scm.com/docs/gitattributes
gitVersion string = "v1.7.11-beta.0+$Format:%h$"
gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD)
gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty"
gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD)
gitTreeState string = "" // state of git tree, either "clean" or "dirty"
buildDate string = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ')
)