-
Notifications
You must be signed in to change notification settings - Fork 190
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
161 lines (142 loc) · 5 KB
/
.goreleaser.yaml
File metadata and controls
161 lines (142 loc) · 5 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
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
# GoReleaser configuration for container-use
version: 2
project_name: container-use
before:
hooks:
- go mod tidy
- ./scripts/completions.sh
- ./scripts/man.sh
builds:
- id: container-use
binary: container-use
main: ./cmd/container-use
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{.Date}}
archives:
- id: container-use-archive
ids:
- container-use
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- LICENSE
- completions/*
- man/*
homebrew_casks:
- repository:
owner: "{{ .Env.GH_ORG_NAME }}"
name: homebrew-tap
branch: "{{ .ProjectName }}-{{ .Version }}"
token: "{{ .Env.GITHUB_TOKEN }}"
pull_request:
enabled: true
name: container-use
binary: container-use
skip_upload: auto # if the version is like v0.0.0-rc1, don't make the tap PR.
commit_author:
name: container-use-bot
email: noreply@dagger.io
url:
template: "https://github.com/{{ .Env.GH_ORG_NAME }}/container-use/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
homepage: "https://github.com/{{ .Env.GH_ORG_NAME }}/container-use"
description: "Containerized environments for coding agents"
manpages:
- man/container-use.1
completions:
bash: "completions/container-use.bash"
zsh: "completions/container-use.zsh"
fish: "completions/container-use.fish"
hooks:
post:
install: |
# remove quarantine xattr (note we don't do anything with signatures yet)
if File.exist?("/usr/bin/xattr")
system "/usr/bin/xattr", "-dr", "com.apple.quarantine", "#{staged_path}/container-use"
end
# Create cu symlink for backward compatibility
FileUtils.ln_sf "#{HOMEBREW_PREFIX}/bin/container-use", "#{HOMEBREW_PREFIX}/bin/cu"
# Install cu completions for backward compatibility
bash_completion = "#{HOMEBREW_PREFIX}/etc/bash_completion.d"
zsh_completion = "#{HOMEBREW_PREFIX}/share/zsh/site-functions"
fish_completion = "#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d"
if File.exist?("#{staged_path}/completions/cu.bash")
FileUtils.mkdir_p bash_completion
FileUtils.cp "#{staged_path}/completions/cu.bash", "#{bash_completion}/cu"
end
if File.exist?("#{staged_path}/completions/cu.zsh")
FileUtils.mkdir_p zsh_completion
FileUtils.cp "#{staged_path}/completions/cu.zsh", "#{zsh_completion}/_cu"
end
if File.exist?("#{staged_path}/completions/cu.fish")
FileUtils.mkdir_p fish_completion
FileUtils.cp "#{staged_path}/completions/cu.fish", "#{fish_completion}/cu.fish"
end
uninstall: |
# Remove cu symlink
FileUtils.rm_f "#{HOMEBREW_PREFIX}/bin/cu"
# Remove cu completions
FileUtils.rm_f "#{HOMEBREW_PREFIX}/etc/bash_completion.d/cu"
FileUtils.rm_f "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_cu"
FileUtils.rm_f "#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d/cu.fish"
# https://goreleaser.com/customization/nix/
nix:
- name: container-use
repository:
owner: "{{ .Env.GH_ORG_NAME }}"
name: nix
commit_author:
name: container-use-bot
email: noreply@dagger.io
url_template: "https://github.com/{{ .Env.GH_ORG_NAME }}/container-use/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
homepage: "https://github.com/{{ .Env.GH_ORG_NAME }}/container-use"
description: "Containerized environments for coding agents"
license: "asl20"
post_install: |
installShellCompletion --cmd container-use \
--bash <($out/bin/container-use completion bash) \
--fish <($out/bin/container-use completion fish) \
--zsh <($out/bin/container-use completion zsh)
# Create cu symlink for backward compatibility
ln -sf $out/bin/container-use $out/bin/cu
# Install cu completions for backward compatibility
installShellCompletion --cmd cu \
--bash <($out/bin/cu completion bash) \
--fish <($out/bin/cu completion fish) \
--zsh <($out/bin/cu completion zsh)
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^ci:"
- "^chore:"
- "Merge pull request"
- "Merge branch"
release:
github:
owner: "{{ .Env.GH_ORG_NAME }}" # reconfigure if test releasing on your own fork
name: container-use
draft: true
prerelease: auto
mode: replace
header: |
## container-use {{ .Tag }}
Download the pre-compiled binaries from the assets below.
footer: |
**Full Changelog**: https://github.com/{{ .Env.GH_ORG_NAME }}/container-use/compare/{{ .PreviousTag }}...{{ .Tag }}