Skip to content

Commit

Permalink
fix: hombrew formula deprecations (plist -> service)
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan committed Aug 17, 2023
1 parent 46dc4c4 commit bcb9ae0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 74 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# so we get proper snapshot version info
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21

- uses: actions/cache@v2
with:
Expand All @@ -34,7 +34,7 @@ jobs:
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist --snapshot
8 changes: 4 additions & 4 deletions .github/workflows/on_tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21

- uses: actions/cache@v2
with:
Expand All @@ -28,7 +28,7 @@ jobs:
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
Expand Down
83 changes: 17 additions & 66 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ builds:
- darwin
- windows
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
format: zip
Expand All @@ -37,7 +32,7 @@ release:
name: vproxy

brews:
- tap:
- repository:
owner: jittering
name: homebrew-kegs

Expand All @@ -64,35 +59,13 @@ brews:
- name: mkcert
- name: nss

# Specify for packages that run as a service.
# Default is empty.
plist: |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{bin}/vproxy</string>
<string>daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}</string>
<key>StandardErrorPath</key>
<string>#{var}/log/vproxy.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/vproxy.log</string>
</dict>
</plist>
service: |
name: "vproxy"
run: ["#{bin}/vproxy", "daemon"]
keep_alive: successful_exit: false
working_directory: "#{var}"
log_path: "#{var}/log/vproxy.log"
error_log_path: "#{var}/log/vproxy.log"
caveats: |
To install your local root CA:
Expand Down Expand Up @@ -199,7 +172,7 @@ brews:
end
end
- tap:
- repository:
owner: jittering
name: homebrew-kegs

Expand Down Expand Up @@ -227,35 +200,13 @@ brews:
- name: nss
- name: go

# Specify for packages that run as a service.
# Default is empty.
plist: |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{bin}/vproxy</string>
<string>daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}</string>
<key>StandardErrorPath</key>
<string>#{var}/log/vproxy.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/vproxy.log</string>
</dict>
</plist>
service: |
name: "vproxy-head"
run: ["#{bin}/vproxy", "daemon"]
keep_alive: successful_exit: false
working_directory: "#{var}"
log_path: "#{var}/log/vproxy.log"
error_log_path: "#{var}/log/vproxy.log"
caveats: |
To install your local root CA:
Expand Down

0 comments on commit bcb9ae0

Please sign in to comment.