1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2026-05-16 09:20:15 +02:00
This commit is contained in:
Carlos Alexandro Becker
2017-01-11 14:52:30 -02:00
parent 8731ef7ece
commit 362d2c61dc
+15 -8
View File
@@ -32,8 +32,8 @@ curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash
``` ```
This will build `main.go` file as `my-binary`, for _Darwin_ and _Linux_, This will build `main.go` file as `my-binary`, for _Darwin_ and _Linux_,
_x86_64_ and _i386_, packaging the binary, `LICENSE.md` and `README.md` _x86_64_ and _i386_, packaging the binary, `LICENSE.*`, `CHANGELOG.*` and
and publish a new github release in the `user/repo` repository with `README.*` and publish a new github release in the `user/repo` repository with
the `.tar.gz` files there. the `.tar.gz` files there.
### Homebrew ### Homebrew
@@ -66,17 +66,21 @@ build:
> `oses` and `arches` should be in `GOOS`/`GOARCH`-compatible format. > `oses` and `arches` should be in `GOOS`/`GOARCH`-compatible format.
### Custom archive file name ### Archive customization
You can customize the name of the archive using the name_template config: You can customize the name and format of the archive adding an `archive`
section:
```yaml ```yaml
repo: user/repo repo: user/repo
binary_name: my-binary binary_name: my-binary
archive:
name_template: "{{.BinaryName}}_{{.Version}}_{{.Os}}_{{.Arch}}" name_template: "{{.BinaryName}}_{{.Version}}_{{.Os}}_{{.Arch}}"
format: tar.gz
``` ```
> Default is "{{.BinaryName}}_{{.Os}}_{{.Arch}}" > Default is "{{.BinaryName}}_{{.Os}}_{{.Arch}}"
> Valid formats are `tar.gz` and `zip`
### Add more files ### Add more files
@@ -92,6 +96,9 @@ files:
- CHANGELOG.md - CHANGELOG.md
``` ```
> By default GoReleaser adds the binary itself, `LICENCE*`, `LICENSE*`,
`README*` and `CHANGELOG*`.
## Wire it with travis-ci ## Wire it with travis-ci
You may want to wire this to auto-deploy your new tags on travis, for example: You may want to wire this to auto-deploy your new tags on travis, for example:
@@ -112,11 +119,11 @@ And the [homebrew formulae](https://github.com/goreleaser/homebrew-formulae/blob
```rb ```rb
class Release < Formula class Release < Formula
desc "Deliver Go binaries as fast and easily as possible." desc "Deliver Go binaries as fast and easily as possible"
homepage "https://github.com/goreleaser/releaser" homepage "https://github.com/goreleaser/releaser"
url "https://github.com/goreleaser/releaser/releases/download/v0.2.0/release_#{%x(uname -s).gsub(/\n/, '')}_#{%x(uname -m).gsub(/\n/, '')}.tar.gz" url "https://github.com/goreleaser/releaser/releases/download/v0.2.8/release_Darwin_x86_64.tar.gz"
head "https://github.com/goreleaser/releaser.git" version "v0.2.8"
version "v0.2.0" sha256 "9ee30fc358fae8d248a2d7538957089885da321dca3f09e3296fe2058e7fff74"
def install def install
bin.install "release" bin.install "release"