mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
parent
3962989f0e
commit
87c5d8651b
17
README.md
17
README.md
@ -107,6 +107,23 @@ files:
|
||||
> By default GoReleaser adds the binary itself, `LICENCE*`, `LICENSE*`,
|
||||
`README*` and `CHANGELOG*`.
|
||||
|
||||
### ldflags
|
||||
|
||||
GoReleaser already sets a `main.version` ldflag, so, in you `main.go` program,
|
||||
you can:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
var version = "master"
|
||||
|
||||
func main() {
|
||||
println(version)
|
||||
}
|
||||
```
|
||||
|
||||
And this version will always be the tag name.
|
||||
|
||||
## Wire it with travis-ci
|
||||
|
||||
You may want to wire this to auto-deploy your new tags on travis, for example:
|
||||
|
Loading…
x
Reference in New Issue
Block a user