forked from percona/mongodb_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
41 lines (41 loc) · 1.72 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This is an goreleaser.yaml file which builds mongodb_exporter releases.
# Make sure to check the documentation at http://goreleaser.com
# You can run it locally or with your CI, but you should use `make community-release` or `make snapshot`
# instead of using `goreleaser` directly as some init steps should be done before it runs.
dist: bin
builds:
- binary: mongodb_exporter
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
flags:
- -v
# We don't use internal `GoReleaser` variables because of consistency with `Makefile` and
# because we can't change it behaviour.
ldflags: |
-X {{.Env.GO_PACKAGE}}/vendor/github.com/percona/pmm/version.ProjectName={{.Env.BIN_NAME}}
-X {{.Env.GO_PACKAGE}}/vendor/github.com/percona/pmm/version.Version={{.Env.APP_VERSION}}
-X {{.Env.GO_PACKAGE}}/vendor/github.com/percona/pmm/version.PMMVersion={{.Env.PMM_RELEASE_VERSION}}
-X {{.Env.GO_PACKAGE}}/vendor/github.com/percona/pmm/version.Timestamp={{.Env.PMM_RELEASE_TIMESTAMP}}
-X {{.Env.GO_PACKAGE}}/vendor/github.com/percona/pmm/version.FullCommit={{.Env.PMM_RELEASE_FULLCOMMIT}}
-X {{.Env.GO_PACKAGE}}/vendor/github.com/percona/pmm/version.Branch={{.Env.PMM_RELEASE_BRANCH}}
-X {{.Env.GO_PACKAGE}}/vendor/github.com/prometheus/common/version.BuildUser={{.Env.USER}}@{{.Env.TRAVIS_APP_HOST}}
archives:
-
name_template: "{{ .ProjectName }}-{{ .Env.APP_VERSION }}.{{ .Os }}-{{ .Arch }}"
checksum:
name_template: '{{ .ProjectName }}-{{ .Env.APP_VERSION }}-checksums.txt'
snapshot:
name_template: "{{ .ShortCommit }}"
changelog:
skip: true
release:
github:
owner: percona
name: mongodb_exporter
draft: true
prerelease: auto