feat: add main module version

main
sudo pacman -Syu 2022-06-01 14:39:27 +07:00
parent 297dc14707
commit 90370abe6e
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
3 changed files with 4 additions and 6 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.18
require (
github.com/go-git/go-git/v5 v5.4.2
github.com/haunt98/clock-go v0.3.0
github.com/make-go-great/buildinfo-go v0.0.2
github.com/make-go-great/buildinfo-go v0.0.4
github.com/make-go-great/color-go v0.3.0
github.com/make-go-great/ioe-go v0.4.0
github.com/make-go-great/markdown-go v0.5.0

4
go.sum
View File

@ -56,8 +56,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/make-go-great/buildinfo-go v0.0.2 h1:I0M7LwXJRhoUyEgLpGFlzvgHj04jKAJ0OozW3vwsDwY=
github.com/make-go-great/buildinfo-go v0.0.2/go.mod h1:neEb4WWRyUmzQvlMqvrjiDexkS+QXZMq2B5yXLe4GS8=
github.com/make-go-great/buildinfo-go v0.0.4 h1:0n5GZzVh45pJoWVRL/JRkxXAOyDwBV92b5EjtVINIko=
github.com/make-go-great/buildinfo-go v0.0.4/go.mod h1:neEb4WWRyUmzQvlMqvrjiDexkS+QXZMq2B5yXLe4GS8=
github.com/make-go-great/color-go v0.3.0 h1:ZVtVk/wVVsZZwSJG7PZpsY5zwIyGao5VoN48yKfSzYA=
github.com/make-go-great/color-go v0.3.0/go.mod h1:G5G8IJ3PUo+vSQ+UvnfaswF8O/piVIhFJKv1mQjBGpI=
github.com/make-go-great/ioe-go v0.4.0 h1:abRH8J01am7A9VsinEG0WnXDiT1CWk7Cd0auRvWuNyQ=

View File

@ -41,9 +41,7 @@ func (a *action) RunVersion(c *cli.Context) error {
return nil
}
version := info.GitCommit
fmt.Println(version)
fmt.Printf("%s-%s\n", info.MainModuleVersion, info.GitCommit)
return nil
}