-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
104 lines (91 loc) · 2.93 KB
/
.goreleaser.yaml
File metadata and controls
104 lines (91 loc) · 2.93 KB
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
# GoReleaser configuration for stave
# See https://goreleaser.com for detailed docs.
version: 2
project_name: stave
env:
- CGO_ENABLED=0
before:
hooks:
# Keep modules tidy before building artifacts
- go mod tidy
# Generate completions into a hidden cache folder.
# This avoids the 'dist' cleanup and prevents parallel race conditions.
- mkdir -p .buildcache/completions
- sh -c "go run . completion bash > .buildcache/completions/stave.bash"
- sh -c "go run . completion zsh > .buildcache/completions/stave.zsh"
- sh -c "go run . completion fish > .buildcache/completions/stave.fish"
builds:
- id: stave
main: .
binary: stave
flags:
- -trimpath
ldflags:
- -s -w
# Inject version metadata so the binary can print it without shelling out.
- -X github.com/yaklabco/stave/cmd/stave/version.Version={{ .Version }}
- -X github.com/yaklabco/stave/cmd/stave/version.Commit={{ .FullCommit }}
- -X github.com/yaklabco/stave/cmd/stave/version.BuildDate={{ .Date }}
goos:
- darwin
- linux
- windows
- freebsd
- netbsd
- openbsd
- dragonfly
goarch:
- amd64
- arm
- arm64
ignore:
- { goos: openbsd, goarch: arm, goarm: 6 }
- { goos: windows, goarch: arm, goarm: 6 }
archives:
- id: default
ids: [stave]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- NOTICE
# Map the completions from our cache into a 'completions' folder in the archive
- src: .buildcache/completions/*
dst: completions
strip_parent: true
checksum:
name_template: "checksums.txt"
snapshot:
version_template: "{{ .Tag }}-dev"
brews:
- name: stave
repository:
owner: yaklabco
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
commit_author:
name: YakLabs
email: official@yaklab.org
homepage: "https://github.com/yaklabco/stave"
description: "Make(file) replacement that is pure Go based (a fork of `makefile/mage`)."
license: "Apache-2.0"
# Installation logic for the binary and completions
# We point to the 'completions' folder created in the archive step above
install: |
bin.install "stave"
bash_completion.install "completions/stave.bash" => "stave"
zsh_completion.install "completions/stave.zsh" => "_stave"
fish_completion.install "completions/stave.fish"
# Useful information displayed after 'brew install'
caveats: |
To enable completions, you may need to add the following to your shell profile, and then open a new shell:
zsh:
autoload -U compinit && compinit
bash:
[[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh"
test: |
system "#{bin}/stave --version"
release:
draft: false
github:
owner: yaklabco
name: stave