sv-tools/bumptag

Panics on fresh repository with no tags yet

Closed this issue · 5 comments

Heyho, i'm workin on a new lib, that i just started 10 mins ago.
Bumptag does not seem to like being run on a new repository, when there are no tags yet.

tobias@tobias-P870DM-G:~/go/src/github.com/Nerzal/atreugo-swagger$ bumptag
panic: command 'git describe --tags --abbrev=0' failed: exit status 128
fatal: Keine Namen gefunden, kann nichts beschreiben.

goroutine 1 [running]:
main.panicIfError(...)
        /home/tobias/go/pkg/mod/github.com/sv-tools/bumptag@v1.5.0/bumptag.go:298
main.main()
        /home/tobias/go/pkg/mod/github.com/sv-tools/bumptag@v1.5.0/bumptag.go:370 +0x9d3

fatal: Keine Namen gefunden, kann nichts beschreiben.

more or less translates to

fatal: No names found, cannot describe

no problem (:

@Nerzal, I cannot reproduce it

20-02-23 17:23 % git init
Initialized empty Git repository in .../tmp/.git/
20-02-23 17:23 % touch 123
20-02-23 17:23 % git add .
20-02-23 17:23 % git ci -m"123"
[master (root-commit) 8736659] 123
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 123
20-02-23 17:24 % bumptag 
tag v0.1.0
Tagger: Sergey Vilgelm <sergey.vilgelm@ibm.com>
Date:   Sun Feb 23 17:24:06 2020 -0600

Bump version v0.1.0

20-02-23 17:24 % git tag -d v0.1.0
Deleted tag 'v0.1.0' (was 197ae63)
20-02-23 17:24 % bumptag 0.0.1    
tag v0.0.1
Tagger: Sergey Vilgelm <sergey.vilgelm@ibm.com>
Date:   Sun Feb 23 17:24:30 2020 -0600

Bump version v0.0.1

I see what happened :) I'm checking an error for No names found text, but you have errors in German

Please test v1.5.1, should work