Skip to content

Commit 680feda

Browse files
committed
Rename binary from commit-msg-go to dot-commit
1 parent a08c6d6 commit 680feda

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ jobs:
1818

1919
- name: Build binaries for all platforms
2020
run: |
21-
GOOS=linux GOARCH=amd64 go build -o commit-msg-go-linux-amd64 commit-msg.go
22-
GOOS=linux GOARCH=arm64 go build -o commit-msg-go-linux-arm64 commit-msg.go
23-
GOOS=darwin GOARCH=amd64 go build -o commit-msg-go-darwin-amd64 commit-msg.go
24-
GOOS=darwin GOARCH=arm64 go build -o commit-msg-go-darwin-arm64 commit-msg.go
25-
GOOS=windows GOARCH=amd64 go build -o commit-msg-go-windows-amd64.exe commit-msg.go
26-
GOOS=windows GOARCH=arm64 go build -o commit-msg-go-windows-arm64.exe commit-msg.go
21+
GOOS=linux GOARCH=amd64 go build -o dot-commit-linux-amd64 commit-msg.go
22+
GOOS=linux GOARCH=arm64 go build -o dot-commit-linux-arm64 commit-msg.go
23+
GOOS=darwin GOARCH=amd64 go build -o dot-commit-darwin-amd64 commit-msg.go
24+
GOOS=darwin GOARCH=arm64 go build -o dot-commit-darwin-arm64 commit-msg.go
25+
GOOS=windows GOARCH=amd64 go build -o dot-commit-windows-amd64.exe commit-msg.go
26+
GOOS=windows GOARCH=arm64 go build -o dot-commit-windows-arm64.exe commit-msg.go
2727
2828
- name: Upload Release Assets
2929
uses: softprops/action-gh-release@v2
3030
with:
3131
files: |
32-
commit-msg-go-linux-amd64
33-
commit-msg-go-linux-arm64
34-
commit-msg-go-darwin-amd64
35-
commit-msg-go-darwin-arm64
36-
commit-msg-go-windows-amd64.exe
37-
commit-msg-go-windows-arm64.exe
32+
dot-commit-linux-amd64
33+
dot-commit-linux-arm64
34+
dot-commit-darwin-amd64
35+
dot-commit-darwin-arm64
36+
dot-commit-windows-amd64.exe
37+
dot-commit-windows-arm64.exe
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install-hook:
1313
curl -fsSL https://raw.githubusercontent.com/inem/dotdotdot/main/install.sh | sh
1414

1515
build:
16-
go build -o release/commit-msg-go commit-msg.go
16+
go build -o release/dot-commit commit-msg.go
1717

1818
release:
1919
git tag v0.0.$(ARGS)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ curl -fsSL https://raw.githubusercontent.com/inem/dot-commit/main/install.sh | s
3232
```bash
3333
make build
3434
```
35-
3. Install the hook and binary (this will overwrite `.git/hooks/commit-msg` and `.git/hooks/commit-msg-go`):
35+
3. Install the hook and binary (this will overwrite `.git/hooks/commit-msg` and `.git/hooks/dot-commit`):
3636
```bash
3737
cp _git/hooks/commit-msg .git/hooks/commit-msg
38-
cp release/commit-msg-go .git/hooks/commit-msg-go
39-
chmod +x .git/hooks/commit-msg .git/hooks/commit-msg-go
38+
cp release/dot-commit .git/hooks/dot-commit
39+
chmod +x .git/hooks/commit-msg .git/hooks/dot-commit
4040
```
4141
4. Set your OpenAI API key in the environment:
4242
```bash

_git/hooks/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/sh
22
# Git commit-msg hook (Go version)
33

4-
HOOK_BIN="$(dirname "$0")/commit-msg-go"
4+
HOOK_BIN="$(dirname "$0")/dot-commit"
55

66
if [ ! -x "$HOOK_BIN" ]; then
7-
echo "commit-msg-go binary not found or not executable: $HOOK_BIN" >&2
7+
echo "dot-commit binary not found or not executable: $HOOK_BIN" >&2
88
exit 1
99
fi
1010

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
HOOK_PATH=".git/hooks/commit-msg"
5-
BIN_PATH=".git/hooks/commit-msg-go"
5+
BIN_PATH=".git/hooks/dot-commit"
66
HOOK_URL="https://raw.githubusercontent.com/inem/dot-commit/main/_git/hooks/commit-msg"
77

88
# Detect OS and ARCH
@@ -27,15 +27,15 @@ case "$OS" in
2727
;;
2828
msys*|cygwin*|mingw*|windowsnt|windows)
2929
OS=windows
30-
BIN_PATH=".git/hooks/commit-msg-go.exe"
30+
BIN_PATH=".git/hooks/dot-commit.exe"
3131
;;
3232
*)
3333
echo "Unsupported OS: $OS"
3434
exit 1
3535
;;
3636
esac
3737

38-
BIN_URL="https://github.com/inem/dot-commit/releases/latest/download/commit-msg-go-${OS}-${ARCH}"
38+
BIN_URL="https://github.com/inem/dot-commit/releases/latest/download/dot-commit-${OS}-${ARCH}"
3939

4040
if [ ! -d .git/hooks ]; then
4141
echo "Error: .git/hooks directory not found. Please run this script from the root of your git repository."

0 commit comments

Comments
 (0)