cmd, internal/build, docker: advertise commit date in unstable build versions (#19522)

* add-date-to unstable

* fields-insteadof-split

* internal/build: support building with missing git

* docker: add git history back to support commit date in version

* internal/build: use PR commits hashes for PR builds
This commit is contained in:
C. Brown authored and Péter Szilágyi committed 2019-05-08 16:44:28 +03:00
1 parent c113723fdb
commit be4d74f8d2
17 files changed
+75 -38

No files matched your search

+4 -1
View File
@@ -55,10 +55,13 @@ func ArchiveVersion(gitCommit string) string {
return vsn
}
func VersionWithCommit(gitCommit string) string {
func VersionWithCommit(gitCommit, gitDate string) string {
vsn := VersionWithMeta
if len(gitCommit) >= 8 {
vsn += "-" + gitCommit[:8]
}
if (VersionMeta != "stable") && (gitDate != "") {
vsn += "-" + gitDate
}
return vsn
}