Skip to content

Commit 1bc8279

Browse files
committed
Add homebrew update to goreleaser
1 parent f52fe58 commit 1bc8279

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.github/workflows/go-releaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
version: latest
2929
args: release --clean
3030
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
3232
- name: Upload assets
3333
uses: actions/upload-artifact@v3
3434
with:

.goreleaser.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,42 @@ changelog:
4242
exclude:
4343
- "^docs:"
4444
- "^test:"
45+
46+
brews:
47+
- name: gitfs
48+
url_template: "https://github.com/dsxack/gitfs/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
49+
commit_author:
50+
name: "Smotrov Dmitriy"
51+
52+
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
53+
folder: Formula
54+
homepage: "https://github.com/dsxack/gitfs"
55+
description: "FUSE filesystem for browsing contents of git repositories revisions"
56+
license: "MIT"
57+
test: |
58+
system "#{bin}/gitfs", "version"
59+
install: |
60+
bin.install "{{ .ProjectName }}"
61+
repository:
62+
owner: "dsxack"
63+
name: "homebrew-tap"
64+
branch: "main"
65+
custom_block: |
66+
class MacFuseRequirement < Requirement
67+
fatal true
68+
69+
satisfy(build_env: false) do
70+
File.exist?("/usr/local/include/fuse/fuse.h") &&
71+
!File.symlink?("/usr/local/include/fuse")
72+
end
73+
74+
def message
75+
<<~EOS
76+
macFUSE is required; install it via:
77+
brew install --cask macfuse
78+
EOS
79+
end
80+
end
81+
82+
depends_on "libfuse" if OS.linux?
83+
depends_on MacFuseRequirement if OS.mac?

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ FUSE filesystem for browsing contents of git repositories revisions.
1515

1616
### Install
1717

18+
with Homebrew
19+
```sh
20+
brew install dsxack/tap/gitfs
21+
```
22+
23+
or with Go
1824
```sh
1925
go install github.com/dsxack/gitfs/cmd/gitfs@latest
2026
```

0 commit comments

Comments
 (0)