You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-09-16 09:26:52 +02:00
docs: moving some sections
Improved docs by renaming and moving some sections
This commit is contained in:
committed by
Carlos Alexandro Becker
parent
27426f2a72
commit
4b98d14f70
@@ -12,7 +12,7 @@ This token should be added to the environment variables as `GITHUB_TOKEN`.
|
||||
Here is how to do it with Travis CI:
|
||||
[Defining Variables in Repository Settings](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings).
|
||||
|
||||
### dist folder
|
||||
### The dist folder
|
||||
|
||||
By default, GoReleaser will create its artifacts in the `./dist` folder.
|
||||
If you must, you can change it by setting it in the `.goreleaser.yml` file:
|
||||
@@ -22,3 +22,23 @@ If you must, you can change it by setting it in the `.goreleaser.yml` file:
|
||||
# .goreleaser.yml
|
||||
dist: another-folder-that-is-not-dist
|
||||
```
|
||||
|
||||
### Using the `main.version`
|
||||
|
||||
GoReleaser always sets a `main.version` *ldflag*.
|
||||
You can use it in your `main.go` file:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
var version = "master"
|
||||
|
||||
func main() {
|
||||
println(version)
|
||||
}
|
||||
```
|
||||
|
||||
`version` will be set to the current Git tag (the `v` prefix is stripped) or the name of
|
||||
the snapshot, if you're using the `--snapshot` flag.
|
||||
|
||||
You can override this by changing the `ldflags` option in the `build` section.
|
||||
|
@@ -1,21 +0,0 @@
|
||||
---
|
||||
title: main.version
|
||||
---
|
||||
|
||||
GoReleaser always sets a `main.version` *ldflag*.
|
||||
You can use it in your `main.go` file:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
var version = "master"
|
||||
|
||||
func main() {
|
||||
println(version)
|
||||
}
|
||||
```
|
||||
|
||||
`version` will be set to the current Git tag (the `v` prefix is stripped) or the name of
|
||||
the snapshot, if you're using the `--snapshot` flag.
|
||||
|
||||
You can override this by changing the `ldflags` option in the `build` section.
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: FPM Linux Packages
|
||||
title: FPM
|
||||
---
|
||||
|
||||
GoReleaser can be wired to [fpm](https://github.com/jordansissel/fpm) to
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Snapcraft Linux Packages
|
||||
title: Snapcraft
|
||||
---
|
||||
|
||||
GoReleaser can generate `snap` packages. [Snaps](http://snapcraft.io/) are a
|
||||
|
Reference in New Issue
Block a user