forked from FiloSottile/yubikey-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
85 lines (74 loc) · 1.84 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
before:
hooks:
- go mod tidy
builds:
-
env:
- CGO_ENABLED=1
id: "yubikey-agent"
main: ./
goos:
- darwin
goarch:
- amd64
- arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
-
name: sandstorm-yubikey-agent
tap:
owner: sandstorm
name: homebrew-tap
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: Sandstorm Release Bot
email: release-bot@sandstorm.de
# Folder inside the repository to put the formula.
# Default is the root folder.
folder: Formula
# Your app's homepage.
# Default is empty.
homepage: "https://github.com/sandstorm/yubikey-agent"
# modelled after https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/yubikey-agent.rb
custom_block: |
conflicts_with "yubikey-agent", because: "you'll want to use the sandstorm forked version of yubikey-agent"
def post_install
(var/"run").mkpath
(var/"log").mkpath
end
def caveats
<<~EOS
To use this SSH agent, add the config to ~/.ssh/config:
Host *
IdentityAgent #{var}/run/yubikey-agent.sock
EOS
end
service do
run [opt_bin/"yubikey-agent", "-l", var/"run/yubikey-agent.sock"]
keep_alive true
log_path var/"log/yubikey-agent.log"
error_log_path var/"log/yubikey-agent.log"
end
test do
socket = testpath/"yubikey-agent.sock"
fork { exec bin/"yubikey-agent", "-l", socket }
sleep 1
assert_predicate socket, :exist?
end