More convenient version string handling (#411)

This commit is contained in:
Joona Hoikkala 2021-03-15 19:58:40 +02:00 committed by GitHub
parent fb1be906f0
commit ac63d5357e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 10 deletions

View File

@ -6,11 +6,11 @@ builds:
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
asmflags: asmflags:
- all=-trimpath={{.Env.GOPATH}} - all=-trimpath
gcflags: gcflags:
- all=-trimpath={{.Env.GOPATH}} - all=-trimpath
ldflags: | ldflags: |
-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -extldflags '-static' -s -w -X github.com/ffuf/ffuf/pkg/ffuf.VERSION_APPENDIX= -extldflags '-static'
goos: goos:
- linux - linux
- windows - windows

View File

@ -1,7 +0,0 @@
package ffuf
const (
//VERSION holds the current version number
VERSION = "1.3.0-git"
VERSION_APPENDIX = ""
)

8
pkg/ffuf/version.go Normal file
View File

@ -0,0 +1,8 @@
package ffuf
var (
//VERSION holds the current version number
VERSION = "1.3.0"
//VERSION_APPENDIX holds additional version definition
VERSION_APPENDIX = "-dev"
)