xorpaul / g10k

my r10k fork in Go
Apache License 2.0
125 stars 50 forks source link

grabbing version from tag name #84

Closed maxadamo closed 6 years ago

maxadamo commented 6 years ago

the change will allow to grab the version number from the tag name it seems to be working even from the master branch, which is surprising: it take the latest tag number

xorpaul commented 6 years ago

You do know that this will only work if the user always executes the g10k binary inside the g10k git source repository, right? 😉

I already started with my release creating script as I need more steps than setting the correct version number inside the g10k.go file. Like creating the binaries for OSX and linux.

xorpaul commented 6 years ago
~/dev/go/src/github.com/maxadamo/g10k(master) $ ./g10k  -version
g10k version 0.4.4-1-g99dc811 Build time: buildtime UTC
~/dev/go/src/github.com/maxadamo/g10k(master) $ cd ..
~/dev/go/src/github.com/maxadamo $ ./g10k/g10k -version
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
main.main()
        /home/xorpaul/dev/go/src/github.com/maxadamo/g10k/g10k.go:179 +0x1e9a
maxadamo commented 6 years ago

OMG :) Forget it :)

maxadamo commented 6 years ago

that's not gonna work :-1: