46 lines
1.1 KiB
Diff
46 lines
1.1 KiB
Diff
diff --git a/caddy.go b/caddy.go
|
|
index 0fda9bc..42a3b79 100644
|
|
--- a/caddy.go
|
|
+++ b/caddy.go
|
|
@@ -875,39 +875,7 @@ func Version() (simple, full string) {
|
|
}
|
|
|
|
if full == "" {
|
|
- var vcsRevision string
|
|
- var vcsTime time.Time
|
|
- var vcsModified bool
|
|
- for _, setting := range bi.Settings {
|
|
- switch setting.Key {
|
|
- case "vcs.revision":
|
|
- vcsRevision = setting.Value
|
|
- case "vcs.time":
|
|
- vcsTime, _ = time.Parse(time.RFC3339, setting.Value)
|
|
- case "vcs.modified":
|
|
- vcsModified, _ = strconv.ParseBool(setting.Value)
|
|
- }
|
|
- }
|
|
-
|
|
- if vcsRevision != "" {
|
|
- var modified string
|
|
- if vcsModified {
|
|
- modified = "+modified"
|
|
- }
|
|
- full = fmt.Sprintf("%s%s (%s)", vcsRevision, modified, vcsTime.Format(time.RFC822))
|
|
- simple = vcsRevision
|
|
-
|
|
- // use short checksum for simple, if hex-only
|
|
- if _, err := hex.DecodeString(simple); err == nil {
|
|
- simple = simple[:8]
|
|
- }
|
|
-
|
|
- // append date to simple since it can be convenient
|
|
- // to know the commit date as part of the version
|
|
- if !vcsTime.IsZero() {
|
|
- simple += "-" + vcsTime.Format("20060102")
|
|
- }
|
|
- }
|
|
+ full = "unknown"
|
|
}
|
|
|
|
if simple == "" || simple == "(devel)" {
|