-
Notifications
You must be signed in to change notification settings - Fork 5
/
.goreleaser.yml
164 lines (139 loc) · 5.44 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# .goreleaser.yml
#dist: target
env:
- GO111MODULE=on
before:
hooks:
- go mod download
archives:
# Builds reference which build instances should be archived in this archive.
- id: default
builds:
- default
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
wrap_in_directory: true
format: tar.gz
format_overrides:
- goos: windows
format: zip
# Additional files/template/globs you want to add to the archive.
# Defaults are any files matching `LICENCE*`, `LICENSE*`,
# `README*` and `CHANGELOG*` (case-insensitive).
#files:
# - LICENSE.txt
# - README_{{.Os}}.md
# - CHANGELOG.md
# - docs/*
# - design/*.png
# - templates/**/*
builds:
- id: default
main: ./cmd/socketace/main.go
binary: socketace
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -extldflags '-static'
- "-X github.com/bokysan/socketace/v2/internal/version.version={{ .Version }}"
- "-X github.com/bokysan/socketace/v2/internal/version.GitCommit={{ .ShortCommit }}"
- "-X github.com/bokysan/socketace/v2/internal/version.GitBranch={{ .Env.GIT_BRANCH }}"
- "-X github.com/bokysan/socketace/v2/internal/version.GitTag={{ .Tag }}"
- "-X github.com/bokysan/socketace/v2/internal/version.GitSummary="
- "-X github.com/bokysan/socketace/v2/internal/version.BuildDate={{ .Date }}"
# There's an issue with ldflags when the there are spaces in argument value -- this does not
# get escaped properly lading to a weird error of how `link` cannot be called. Until the
# issue is resolved, we will not be including the go version in the build.
#- "-X github.com/bokysan/socketace/v2/internal/version.GoVersion='{{ .Env.GOVERSION }}'"
env:
- CGO_ENABLED=0
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
#
# Note: building for android (at least arm64) fails:
# https://github.com/bokysan/socketace/runs/1192744354?check_suite_focus=true#step:4:88
# link: running gcc failed: exit status 1
# /usr/bin/ld: /tmp/go-link-964528223/go.o: Relocations in generic ELF (EM: 183)
#
# Android seems to require CGO_ENABLED=1 flag. This means a separate build will be needed to
# support Android.
#
goos: [ 'darwin', 'linux', 'freebsd', 'netbsd', 'dragonfly', 'openbsd', 'windows' ] # Dynamic
goarch: [ '386', 'amd64', 'mips', 'mips64', 'mips64le', 'mipsle', 'ppc64le', 'arm', 'arm64', 's390x' ] # Dynamic
goarm: [ '5', '6', '7' ] # Dynamic
gomips: [ 'hardfloat', 'softfloat' ] # Dynamic
ignore:
- goos: openbsd
goarch: arm
- goos: netbsd
goarch: arm
- goos: freebsd
goarch: arm
- goos: netbsd
goarch: arm
- goos: solaris
goarch: arm
mod_timestamp: '{{ .CommitTimestamp }}'
skip: false
nfpms:
- id: "default"
builds: [ "default" ]
vendor: Bokysan
homepage: https://github.com/bokysan/socketace
license: GNU GPL v3.0
maintainer: Boky <https://github.com/bokysan/socketace>
description: Your ultimate connection proxy.
bindir: "/usr/local/bin"
formats: [ 'apk', 'deb', 'rpm' ]
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
brews:
- name: default
# GOARM to specify which 32-bit arm version to use if there are multiple versions
# from the build section. Brew formulas support atm only one 32-bit version.
# Default is 6 for all artifacts or each id if there a multiple versions.
goarm: 6
tap:
owner: bokysan
name: socketace-brew
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
url_template: "http://github.mycompany.com/bokysan/socketace-brew/releases/{{ .Tag }}/{{ .ArtifactName }}"
# Allows you to set a custom download strategy. Note that you'll need
# to implement the strategy and add it to your tap repository.
# Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly
# Default is empty.
# download_strategy: CurlDownloadStrategy
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: goreleaserbot
email: [email protected]
# Folder inside the repository to put the formula.
# Default is the root folder.
# folder: Formula
# Caveats for the user of your binary.
# Default is empty.
# caveats: "How to use this binary"
# Your app's homepage.
# Default is empty.
homepage: "https://github.com/bokysan/socketace"
# Your app's description.
description: "Your ultimate connection proxy."
# Custom block for brew.
# Can be used to specify alternate downloads for devel or head releases.
# Default is empty.
custom_block: |
head "https://github.com/bokysan/socketace.git"
# Packages your package depends on.
#dependencies:
# - name: git
# - name: zsh
# type: optional
# Packages that conflict with your package.
#conflicts:
# - svn
# - bash
# So you can `brew test` your formula.
# Default is empty.
test: |
system "#{bin}/socketace version"
install: |
bin.install "socketace"