Skip to content

Commit

Permalink
Merge pull request #55353 from david-mcmahon/eliminate-version-updates
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 55265, 54092, 55353, 53733, 55385). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Capture git export-subst strings in version.sh for 'git archive' use.

Eliminate the need to update pkg/version/base.go on release branch tagging.

This excellent solution brought to you by @ixdy.

 - [ ] Cherrypick to release-1.8
 - [ ] Cherrypick to release-1.7
 - [ ] Cherrypick to release-1.6?
 - [ ] Update kubernetes/release/anago to skip updating base.go files

ref kubernetes/release#459
ref #16815 (somewhat related)
cc @javier-b-perez

Kubernetes-commit: 4e68d2511ef07428a69a2b6c66efc2b05f4b97dc
  • Loading branch information
k8s-publish-robot committed Nov 27, 2017
2 parents 70172e9 + 8dc3cca commit ea71c06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/version/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "v0.0.0-master+$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')
)

0 comments on commit ea71c06

Please sign in to comment.