This commit is contained in:
Lukas Wurzinger 2024-12-15 17:01:07 +01:00
parent 111c621643
commit eca4a3e927
2 changed files with 10 additions and 2 deletions

2
get.go
View file

@ -26,6 +26,8 @@ func Get() (Binfo, error) {
b.Module.Path = o.Main.Path
b.Module.Sum = o.Main.Sum
b.Build.GoVersion = o.GoVersion
for _, setting := range o.Settings {
switch setting.Key {
case "-buildmode":

View file

@ -29,6 +29,12 @@
{{- .Sep -}}
{{- if and .VCS (ne .I.VCS.Name "") -}}
vcs {{ .I.VCS.Name }} (rev {{ .I.VCS.Revision }}) (at {{ .I.VCS.Time.Format "2006-01-02 15:04:05" }}){{- if .I.VCS.Modified }} (modified){{- end -}}
{{- if .VCS -}}
{{- $time := .I.VCS.Time.Format "2006-01-02 15:04:05" -}}
vcs
{{- if ne .I.VCS.Name "" }} {{ .I.VCS.Name }}{{- end -}}
{{- if ne .I.VCS.Revision "" }} (revision {{ .I.VCS.Revision }}){{- end -}}
{{- if ne $time "" }} (at {{ $time }}){{- end -}}
{{- if .I.VCS.Modified }} (modified){{- end -}}
{{- end -}}