Skip to content

Commit 6ef49fd

Browse files
committed
feat(build): add macos support and rename ai-commit
Adds macos-latest to CI workflows and renames the executable to AICommit.
1 parent 77f658f commit 6ef49fd

8 files changed

Lines changed: 16 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030
strategy:
3131
matrix:
32-
os: [ubuntu-latest, windows-latest]
32+
os: [ubuntu-latest, windows-latest, macos-latest]
3333
include:
3434
- os: ubuntu-latest
3535
asset_name: ai-commit-linux
3636
asset_path_suffix: AI-Commit
3737
- os: windows-latest
3838
asset_name: ai-commit-windows.exe
3939
asset_path_suffix: AI-Commit.exe
40+
- os: macos-latest
41+
asset_name: ai-commit-macos
42+
asset_path_suffix: AI-Commit
4043
steps:
4144
- name: Checkout code
4245
uses: actions/checkout@v4
@@ -62,4 +65,4 @@ jobs:
6265
upload_url: ${{ needs.create_release.outputs.upload_url }}
6366
asset_path: ./dist/${{ matrix.asset_path_suffix }}
6467
asset_name: ${{ matrix.asset_name }}
65-
asset_content_type: application/octet-stream
68+
asset_content_type: application/octet-stream

.github/workflows/pull-request-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
os: [ubuntu-latest, windows-latest]
13+
os: [ubuntu-latest, windows-latest, macos-latest]
1414
python-version: ["3.10"]
1515

1616
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ src/gui/__pycache__
44
src/utils/__pycache__
55
venv
66
build
7+
dist
78
*.spec

dist/AiCommit

-45.8 MB
Binary file not shown.

scripts/ai-commit.desktop

100644100755
File mode changed.

scripts/build.bat

100644100755
File mode changed.

scripts/build.sh

100644100755
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Script to create the AI-Commit installer for Linux
2+
# Script to create the AICommit installer for Linux
33
# Exit on error
44
set -e
55

@@ -16,34 +16,34 @@ pip install -r requirements.txt
1616

1717
# 3. Run PyInstaller
1818
echo "--- Building executable with PyInstaller ---"
19-
pyinstaller --name "AI-Commit" --windowed --onefile --icon="assets/icon.ico" main.py
19+
pyinstaller --name "AICommit" --windowed --onefile --icon="assets/icon.ico" main.py
2020

2121
# 4. Prepare installer package
2222
echo "--- Creating Linux installer package ---"
23-
INSTALLER_DIR="ai-commit-linux-installer"
23+
INSTALLER_DIR="AICommit-linux-installer"
2424
rm -rf $INSTALLER_DIR
2525
mkdir -p $INSTALLER_DIR/usr/local/bin
2626
mkdir -p $INSTALLER_DIR/usr/share/applications
2727
mkdir -p $INSTALLER_DIR/usr/share/icons/hicolor/256x256/apps
2828

2929
# Copy necessary files
30-
cp dist/AI-Commit $INSTALLER_DIR/usr/local/bin/ai-commit
31-
cp assets/icon.png $INSTALLER_DIR/usr/share/icons/hicolor/256x256/apps/ai-commit.png
32-
cp scripts/ai-commit.desktop $INSTALLER_DIR/usr/share/applications/
30+
cp dist/AICommit $INSTALLER_DIR/usr/local/bin/AICommit
31+
cp assets/icon.png $INSTALLER_DIR/usr/share/icons/hicolor/256x256/apps/AICommit.png
32+
cp scripts/AICommit.desktop $INSTALLER_DIR/usr/share/applications/
3333

3434
# Create the installation script
3535
cat > $INSTALLER_DIR/install.sh <<EOL
3636
#!/bin/bash
37-
echo "Installing AI-Commit..."
37+
echo "Installing AICommit..."
3838
sudo cp -r usr /
3939
echo "Updating icon cache..."
4040
sudo gtk-update-icon-cache /usr/share/icons/hicolor || echo "Failed to update icon cache."
41-
echo "Installation complete. Run 'ai-commit' from your terminal or find it in your applications menu."
41+
echo "Installation complete. Run 'AICommit' from your terminal or find it in your applications menu."
4242
EOL
4343
chmod +x $INSTALLER_DIR/install.sh
4444

4545
# Create the tar.gz archive
46-
TARBALL_NAME="AI-Commit-Linux-Installer.tar.gz"
46+
TARBALL_NAME="AICommit-Linux-Installer.tar.gz"
4747
echo "--- Packaging installer into $TARBALL_NAME ---"
4848
tar -czvf $TARBALL_NAME -C $INSTALLER_DIR .
4949

scripts/installer.iss

100644100755
File mode changed.

0 commit comments

Comments
 (0)