upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / caddy / trunk / override-main-module-version.patch
blobe364293bd4cc603e5d24d30cb3a05296bb785f55
1 --- a/caddy.go~ 2022-10-02 18:58:35.059343203 +0200
2 +++ b/caddy.go 2022-10-02 18:58:21.125992368 +0200
3 @@ -875,39 +875,7 @@
6 if full == "" {
7 - var vcsRevision string
8 - var vcsTime time.Time
9 - var vcsModified bool
10 - for _, setting := range bi.Settings {
11 - switch setting.Key {
12 - case "vcs.revision":
13 - vcsRevision = setting.Value
14 - case "vcs.time":
15 - vcsTime, _ = time.Parse(time.RFC3339, setting.Value)
16 - case "vcs.modified":
17 - vcsModified, _ = strconv.ParseBool(setting.Value)
18 - }
19 - }
21 - if vcsRevision != "" {
22 - var modified string
23 - if vcsModified {
24 - modified = "+modified"
25 - }
26 - full = fmt.Sprintf("%s%s (%s)", vcsRevision, modified, vcsTime.Format(time.RFC822))
27 - simple = vcsRevision
29 - // use short checksum for simple, if hex-only
30 - if _, err := hex.DecodeString(simple); err == nil {
31 - simple = simple[:8]
32 - }
34 - // append date to simple since it can be convenient
35 - // to know the commit date as part of the version
36 - if !vcsTime.IsZero() {
37 - simple += "-" + vcsTime.Format("20060102")
38 - }
39 - }
40 + full = "unknown"
43 if simple == "" || simple == "(devel)" {