Skip to content

Commit

Permalink
Further fixes to Homebrew release
Browse files Browse the repository at this point in the history
- fix checksums for macOS binaries
- fix indentation in formula
- add test block (🤞)
  • Loading branch information
kdambekalns committed Sep 27, 2024
1 parent 438d734 commit 656827f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ jobs:
artifactContentType: application/zip
generateReleaseNotes: false
makeLatest: true
name: Release ${{ github.ref }}
name: Release ${{ github.ref_name }}

- name: Calculate checksums (darwin)
id: calculate-checksums-darwin
run: |
echo "darwin_amd64_sha256sum=$(sha256sum --quiet beach_darwin_amd64.zip)" >> $GITHUB_OUTPUT
echo "darwin_arm64_sha256sum=$(sha256sum --quiet beach_darwin_arm64.zip)" >> $GITHUB_OUTPUT
echo "darwin_amd64_sha256sum=$(sha256sum beach_darwin_amd64.zip | awk '//{print $1}')" >> $GITHUB_OUTPUT
echo "darwin_arm64_sha256sum=$(sha256sum beach_darwin_arm64.zip | awk '//{print $1}')" >> $GITHUB_OUTPUT
- name: Calculate checksum (linux)
id: calculate-checksums-linux
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/localbeach.rb.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class Localbeach < Formula
version "{{VERSION}}"
license "GPL-3.0-or-later"

depends_on "mkcert"
depends_on "nss"

on_macos do
on_intel do
url "https://github.com/flownative/localbeach/releases/download/v{{VERSION}}/beach_darwin_amd64.zip"
Expand All @@ -25,17 +28,18 @@ class Localbeach < Formula
sha256 "{{LINUX_SHA256SUM}}"
end

depends_on "mkcert"
depends_on "nss"

def install
bin.install "beach" => "beach"
end

def caveats
<<~EOS
Local Beach is built on top of Docker and Docker Compose.
You will need a working setup of both in order to use Local Beach.
Local Beach is built on top of Docker and Docker Compose.
You will need a working setup of both in order to use Local Beach.
EOS
end

test do
assert_match "Local Beach v{{VERSION}}", shell_output("#{bin}/beach version")
end
end

0 comments on commit 656827f

Please sign in to comment.