Skip to content

Commit

Permalink
TASK: try to fix formula
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed Nov 23, 2021
1 parent a27b187 commit 7912f31
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,33 @@ brews:
# 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: |
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ ADJUSTMENTS compared to upstream fork:
We could not get Github actions to work properly (due to cross compile and other issues); so we
are compiling locally (tested on M1 Mac):


```
git tag v0.1.5-p4
git push origin v0.1.5-p4
goreleaser --rm-dist
```


Original readme follows below.
Expand Down

0 comments on commit 7912f31

Please sign in to comment.