1
0
mirror of https://github.com/therootcompany/go-gitver.git synced 2024-11-16 17:08:59 +00:00

Compare commits

..

No commits in common. "master" and "v2.0.2" have entirely different histories.

6 changed files with 16 additions and 11 deletions

View File

@ -1,6 +1,6 @@
# [Go GitVer](https://git.rootprojects.org/root/go-gitver)
Use **git tags** to add (GoReleaser-compatible) [**semver**](https://semver.org/)
Use **git tags** to add (GoRelesear-compatible) [**semver**](https://semver.org/)
to your go package in under 150
[lines of code](https://git.rootprojects.org/root/go-gitver/src/branch/master/gitver/gitver.go).
@ -28,11 +28,6 @@ See <https://pkg.go.dev/git.rootprojects.org/root/go-gitver/v2>.
package main
import (
"fmt"
"strings"
)
var (
commit = "0000000"
version = "0.0.0-pre0+0000000"
@ -40,7 +35,7 @@ var (
)
func main() {
if (len(os.Args) > 1 && "version" == strings.TrimLeft(os.Args[1], "-")) {
if (len(os.Args) > 1 && "version" === os.Args[1]) {
fmt.Printf("Foobar v%s (%s) %s\n", version, commit[:7], date)
}
// ...

View File

@ -2,4 +2,6 @@ module example.com/hello
go 1.12
require git.rootprojects.org/root/go-gitver/v2 v2.0.2
require (
git.rootprojects.org/root/go-gitver/v2 v2.0.1
)

View File

@ -2,4 +2,6 @@ module example.com/hello
go 1.12
require git.rootprojects.org/root/go-gitver/v2 v2.0.2
require (
git.rootprojects.org/root/go-gitver/v2 v2.0.1
)

View File

@ -2,4 +2,6 @@ module example.com/hello
go 1.12
require git.rootprojects.org/root/go-gitver/v2 v2.0.2
require (
git.rootprojects.org/root/go-gitver/v2 v2.0.1
)

View File

@ -2,4 +2,6 @@ module example.com/hello
go 1.12
require git.rootprojects.org/root/go-gitver/v2 v2.0.2
require (
git.rootprojects.org/root/go-gitver/v2 v2.0.1
)

2
go.sum
View File

@ -0,0 +1,2 @@
git.rootprojects.org/root/go-gitver v1.1.3 h1:/qR9z53vY+IFhWRxLkF9cjaiWh8xRJIm6gyuW+MG81A=
git.rootprojects.org/root/go-gitver v1.1.3/go.mod h1:Rj1v3TBhvdaSphFEqMynUYwAz/4f+wY/+syBTvRrmlI=