Skip to content

Commit 9f5a237

Browse files
authored
refactor: rename program from git-commit-generator to git-msg (#35)
* Update binary name and references across all files * Update package name in nix flake * Modify GitHub workflows to use new artifact names * Update README and documentation with new command name Signed-off-by: Qiming Chu <[email protected]>
1 parent c846458 commit 9f5a237

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: cachix/install-nix-action@v31
3030
- name: Build Git Commit Generator
31-
run: nix build '.#git-commit-generator'
31+
run: nix build -L
3232
- name: Upload Git Commit Generator
3333
uses: actions/[email protected]
3434
with:
35-
name: git-commit-generator-${{ matrix.os }}
36-
path: result/bin/git-commit-generator
35+
name: git-msg-${{ matrix.os }}
36+
path: result/bin/git-msg

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
os: [ubuntu-latest, macos-latest]
1818
include:
1919
- os: ubuntu-latest
20-
asset_name: git-commit-generator-x86_64-linux
20+
asset_name: git-msg-x86_64-linux
2121
asset_content_type: application/octet-stream
2222
- os: macos-latest
23-
asset_name: git-commit-generator-aarch64-macos
23+
asset_name: git-msg-aarch64-macos
2424
asset_content_type: application/octet-stream
2525
permissions:
2626
contents: write
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup project
4848
run: |
4949
nix build -L
50-
cp result/bin/git-commit-generator ${{ matrix.asset_name }}
50+
cp result/bin/git-msg ${{ matrix.asset_name }}
5151
- name: Calculate checksums
5252
id: checksums
5353
run: |
@@ -61,7 +61,7 @@ jobs:
6161
draft: false
6262
prerelease: false
6363
body: |
64-
# Git Commit Generator ${{ env.VERSION }}
64+
# Git Commit Generator (git-msg) ${{ env.VERSION }}
6565
6666
Release date: ${{ env.RELEASE_DATE }}
6767
@@ -78,13 +78,13 @@ jobs:
7878
7979
### Download
8080
```bash
81-
chmod +x git-commit-generator
82-
sudo mv git-commit-generator /usr/local/bin/git-commit-generator
81+
chmod +x git-msg
82+
sudo mv git-msg /usr/local/bin/git-msg
8383
```
8484
8585
### Use Nix
8686
```bash
87-
nix run github:Emin017/git-commit-generator
87+
nix run github:Emin017/git-commit-generator#git-msg
8888
```
8989
files: |
9090
${{ matrix.asset_name }}

.github/workflows/update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
nix flake update
2020
- name: Build Git Commit Generator
2121
run: |
22-
nix build '.#git-commit-generator'
22+
nix build -L
2323
- name: Create Pull Request
2424
run: |
2525
echo "Creating a new pull request..."

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "git-commit-generator"
32
version = "0.1.0"
3+
name = "git-msg"
44
edition = "2021"
55
authors = ["Emin <[email protected]>"]
66
description = """

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🚀 Git Commit Generator
1+
# 🚀 Git Commit Generator (git-msg)
22

33
<div align="center">
44
<img alt="DeepSeek AI" src="https://img.shields.io/badge/DeepSeek-AI-%23FF6F61.svg?style=for-the-badge">
@@ -56,13 +56,13 @@ cargo build --release
5656
# Install the binary
5757
cargo install --path .
5858
# Run the binary
59-
git-commit-generator --help
59+
git-msg --help
6060
```
6161

6262
#### Using Nix
6363

6464
```shell
65-
nix run github:Emin017/git-commit-generator#git-commit-generator
65+
nix run github:Emin017/git-commit-generator#git-msg
6666
```
6767

6868
## ⚙️ Configure DeepSeek API Key
@@ -79,13 +79,13 @@ DEEPSEEK_API_KEY=your_api_key_here
7979
git add .
8080

8181
# Generate commit message
82-
git-commit-generator
82+
git-msg
8383

8484
# Use different commit format
85-
git-commit-generator --format conventional
85+
git-msg --format conventional
8686

8787
# Use different model
88-
git-commit-generator --model deepseek-coder
88+
git-msg --model deepseek-coder
8989
```
9090

9191
### 💡 Available Options

README_CN.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🚀 Git Commit Generator
1+
# 🚀 Git Commit Generator (git-msg)
22

33
<div align="center">
44
<img alt="DeepSeek AI" src="https://img.shields.io/badge/DeepSeek-AI-%23FF6F61.svg?style=for-the-badge">
@@ -55,14 +55,14 @@ cd git-commit-generator
5555
cargo build --release
5656
cargo install --path .
5757
# 运行二进制文件
58-
git-commit-generator --help
58+
git-msg --help
5959
```
6060

6161
#### 使用 Nix
6262

6363
```shell
6464
# 使用 Nix
65-
nix run github:Emin017/git-commit-generator#git-commit-generator
65+
nix run github:Emin017/git-commit-generator#git-msg
6666
```
6767

6868
## ⚙️ 配置 DeepSeek API 密钥
@@ -79,13 +79,13 @@ DEEPSEEK_API_KEY=your_api_key_here
7979
git add .
8080

8181
# 生成提交信息
82-
git-commit-generator
82+
git-msg
8383

8484
# 使用不同的提交格式
85-
git-commit-generator --format conventional
85+
git-msg --format conventional
8686

8787
# 使用不同的模型
88-
git-commit-generator --model deepseek-coder
88+
git-msg --model deepseek-reasoner
8989
```
9090

9191
### 💡 可用选项

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
in
4242
{
4343
packages = {
44-
git-commit-generator = pkgs.callPackage ./nix/pkgs/git-commit-generator.nix { };
45-
default = self.packages.${system}.git-commit-generator;
44+
git-msg = pkgs.callPackage ./nix/pkgs/git-msg.nix { };
45+
default = self.packages.${system}.git-msg;
4646
};
4747
devShells.default = pkgs.mkShell {
48-
inputsFrom = [ self.packages.${system}.git-commit-generator ];
48+
inputsFrom = [ self.packages.${system}.git-msg ];
4949
buildInputs = with pkgs; [
5050
rust-analyzer
5151
rustfmt
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ let
99
libiconvLib = pkgs.pkgsStatic.libiconv.dev;
1010
in
1111
pkgs.pkgsStatic.rustPlatform.buildRustPackage {
12-
pname = "git-commit-generator";
13-
version = "0.1.0.0";
12+
pname = "git-msg";
13+
version = "0.1.0";
1414

1515
cargoLock = {
1616
lockFile = ./../../Cargo.lock;

0 commit comments

Comments
 (0)