-
Notifications
You must be signed in to change notification settings - Fork 11
/
.goreleaser.vendor.yaml.tpl
97 lines (89 loc) · 2.75 KB
/
.goreleaser.vendor.yaml.tpl
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# GoReleaser configuration for the ${VENDOR_NAME} CLI.
project_name: ${VENDOR_BINARY}
before:
hooks:
- go generate ./...
- bash scripts/generate_completions.sh
builds:
- binary: ${VENDOR_BINARY}
id: ${VENDOR_BINARY}
env:
- CGO_ENABLED=0
tags:
- vendor
goos:
- linux
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X "github.com/platformsh/cli/internal/legacy.PHPVersion={{.Env.PHP_VERSION}}"
- -X "github.com/platformsh/cli/internal/legacy.LegacyCLIVersion={{.Env.LEGACY_CLI_VERSION}}"
- -X "github.com/platformsh/cli/commands.version={{.Version}}"
- -X "github.com/platformsh/cli/commands.commit={{.Commit}}"
- -X "github.com/platformsh/cli/commands.date={{.Date}}"
- -X "github.com/platformsh/cli/commands.vendor=${VENDOR_BINARY}"
- -X "github.com/platformsh/cli/commands.builtBy=goreleaser"
main: ./cmd/platform
- binary: ${VENDOR_BINARY}
id: ${VENDOR_BINARY}-macos
env:
- CGO_ENABLED=0
tags:
- vendor
goos:
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X "github.com/platformsh/cli/internal/legacy.PHPVersion={{.Env.PHP_VERSION}}"
- -X "github.com/platformsh/cli/internal/legacy.LegacyCLIVersion={{.Env.LEGACY_CLI_VERSION}}"
- -X "github.com/platformsh/cli/commands.version={{.Version}}"
- -X "github.com/platformsh/cli/commands.commit={{.Commit}}"
- -X "github.com/platformsh/cli/commands.date={{.Date}}"
- -X "github.com/platformsh/cli/commands.vendor=${VENDOR_BINARY}"
- -X "github.com/platformsh/cli/commands.builtBy=goreleaser"
main: ./cmd/platform
checksum:
name_template: checksums.txt
snapshot:
name_template: '{{ incpatch .Version }}-{{ .Now.Format "2006-01-02" }}-{{ .ShortCommit }}-next'
universal_binaries:
- id: ${VENDOR_BINARY}-macos
name_template: ${VENDOR_BINARY}
replace: true
archives:
- name_template: "${VENDOR_BINARY}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- completion/*
format_overrides:
- goos: windows
format: zip
nfpms:
- homepage: https://docs.platform.sh/administration/cli.html
package_name: ${VENDOR_BINARY}-cli
description: ${VENDOR_NAME} CLI
maintainer: Antonis Kalipetis <antonis.kalipetis@platform.sh>
license: MIT
vendor: Platform.sh
builds:
- ${VENDOR_BINARY}
formats:
- apk
- deb
- rpm
contents:
- src: completion/bash/${VENDOR_BINARY}.bash
dst: /etc/bash_completion.d/${VENDOR_BINARY}
- src: completion/zsh/_${VENDOR_BINARY}
dst: /usr/local/share/zsh/site-functions/_${VENDOR_BINARY}
release:
disable: true