File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ SHELL := /bin/bash
6
6
build :
7
7
set -e
8
8
mkdir -p bin
9
- VERSION=$$(git describe --tags --always --dirty || echo "dev" )
9
+ if [ -z " $$ VERSION" ]; then \
10
+ VERSION=$$(git describe --tags --always --dirty || echo "dev" ) ; \
11
+ fi
10
12
echo " Building version $$ {VERSION}"
11
13
go build -ldflags " -X main.Version=$$ {VERSION}" -o bin/aicommit ./cmd/aicommit
Original file line number Diff line number Diff line change 1
1
class Aicommit < Formula
2
2
desc "AI-powered commit message generator"
3
3
homepage "https://github.com/coder/aicommit"
4
- url "https://github.com/coder/aicommit.git" , revision : "HEAD"
5
- version "0.0.0" # This will be overridden by the git describe in the Makefile
4
+ version "0.6.2"
5
+ url "https://github.com/coder/aicommit/archive/refs/tags/v#{ version } .tar.gz"
6
+ sha256 "04a980875e97aebc0f7bbeaa183aa5542b18c6e009505babbd494fe0fe62b18e"
6
7
license "CC0-1.0"
7
8
8
9
depends_on "go" => "1.21"
9
10
depends_on "make" => :build
10
11
11
12
def install
12
- system "git" , "pull"
13
- system "make" , "build"
13
+ version = "v#{ version } "
14
+ ENV [ "VERSION" ] = version
15
+ system "make" , "build" , "VERSION=#{ version } "
14
16
bin . install "bin/aicommit"
15
17
end
16
18
You can’t perform that action at this time.
0 commit comments