Skip to content

Commit 95ad724

Browse files
committed
brew: bump version and add SHA script for Homebrew formula
1 parent 233c2f3 commit 95ad724

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SHELL := /bin/bash
66
build:
77
set -e
88
mkdir -p bin
9+
# version may be passed in via homebrew formula
910
if [ -z "$$VERSION" ]; then \
1011
VERSION=$$(git describe --tags --always --dirty || echo "dev"); \
1112
fi

brew/aicommit.rb

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
class Aicommit < Formula
22
desc "AI-powered commit message generator"
33
homepage "https://github.com/coder/aicommit"
4-
version "0.6.2"
4+
version "0.6.3"
55
url "https://github.com/coder/aicommit/archive/refs/tags/v#{version}.tar.gz"
6-
sha256 "04a980875e97aebc0f7bbeaa183aa5542b18c6e009505babbd494fe0fe62b18e"
6+
sha256 "f42fac51fbe334f4d4057622b152eff168f4aa28d6da484af1cea966abd836a1"
77
license "CC0-1.0"
88

99
depends_on "go" => "1.21"
1010
depends_on "make" => :build
1111

1212
def install
13-
version = "v#{version}"
14-
ENV["VERSION"] = version
15-
system "make", "build", "VERSION=#{version}"
13+
ENV["VERSION"] = "v#{version}"
14+
system "make", "build"
1615
bin.install "bin/aicommit"
1716
end
1817

1918
test do
20-
assert_match(/aicommit \S+/, shell_output("#{bin}/aicommit version"))
19+
assert_match "aicommit v#{version}", shell_output("#{bin}/aicommit version")
2120
end
2221
end
2322

brew/sha.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
VERSION=0.6.3
5+
6+
pushd /tmp
7+
wget https://github.com/coder/aicommit/archive/refs/tags/v${VERSION}.tar.gz
8+
sha256sum v${VERSION}.tar.gz
9+
popd

0 commit comments

Comments
 (0)