Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if command -v swiftlint >/dev/null 2>&1; then

if [ -n "$STAGED_SWIFT" ]; then
echo "Checking staged Swift files..."
swiftlint lint --quiet CopilotMonitor/CopilotMonitor
swiftlint lint --quiet UsageBar/UsageBar
if [ $? -ne 0 ]; then
echo "❌ SwiftLint found issues"
EXIT_CODE=1
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: macos-26
env:
XCODE_VERSION: '26.4'
PROJECT_FILE: CopilotMonitor.xcodeproj
SCHEME: CopilotMonitor
PROJECT_FILE: UsageBar.xcodeproj
SCHEME: UsageBar
APP_BUNDLE_NAME: UsageBar.app
defaults:
run:
working-directory: CopilotMonitor
working-directory: UsageBar

steps:
- name: Checkout
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Read Version
id: version
run: |
VERSION=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' CopilotMonitor/Info.plist)
VERSION=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' UsageBar/Info.plist)
echo "version=v${VERSION}" >> "$GITHUB_OUTPUT"
echo "version_number=${VERSION}" >> "$GITHUB_OUTPUT"

Expand All @@ -37,7 +37,7 @@ jobs:
-scheme "$SCHEME" \
-configuration Release \
-destination "generic/platform=macOS" \
-archivePath build/CopilotMonitor.xcarchive \
-archivePath build/UsageBar.xcarchive \
archive \
ARCHS="arm64 x86_64" \
ONLY_ACTIVE_ARCH=NO \
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Export App
run: |
mkdir -p build/export
cp -R "build/CopilotMonitor.xcarchive/Products/Applications/${APP_BUNDLE_NAME}" build/export/
cp -R "build/UsageBar.xcarchive/Products/Applications/${APP_BUNDLE_NAME}" build/export/

- name: Verify Universal Binary
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-26
defaults:
run:
working-directory: CopilotMonitor/CopilotMonitor
working-directory: UsageBar/UsageBar

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
echo "No Swift files changed"
fi
else
echo "Linting all files in CopilotMonitor/CopilotMonitor"
swiftlint lint --reporter github-actions-logging CopilotMonitor/CopilotMonitor
echo "Linting all files in UsageBar/UsageBar"
swiftlint lint --reporter github-actions-logging UsageBar/UsageBar
fi
env:
GH_TOKEN: ${{ github.token }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ jobs:
- name: Update Version Files
run: |
VERSION="${{ steps.release_version.outputs.version_number }}"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" CopilotMonitor/CopilotMonitor/Info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSION" CopilotMonitor/CopilotMonitor/Info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" UsageBar/UsageBar/Info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSION" UsageBar/UsageBar/Info.plist
perl -0pi -e 's/UsageBar v\d+\.\d+\.\d+/UsageBar v'"$VERSION"'/g' README.md README.zh-CN.md

- name: Build Unsigned Archive
run: |
cd CopilotMonitor
xcodebuild -project CopilotMonitor.xcodeproj \
-scheme CopilotMonitor \
cd UsageBar
xcodebuild -project UsageBar.xcodeproj \
-scheme UsageBar \
-configuration Release \
-destination "generic/platform=macOS" \
-archivePath build/CopilotMonitor.xcarchive \
-archivePath build/UsageBar.xcarchive \
archive \
ARCHS="arm64 x86_64" \
ONLY_ACTIVE_ARCH=NO \
Expand All @@ -128,12 +128,12 @@ jobs:

- name: Export App
run: |
mkdir -p CopilotMonitor/build/export
cp -R "CopilotMonitor/build/CopilotMonitor.xcarchive/Products/Applications/UsageBar.app" CopilotMonitor/build/export/
mkdir -p UsageBar/build/export
cp -R "UsageBar/build/UsageBar.xcarchive/Products/Applications/UsageBar.app" UsageBar/build/export/

- name: Verify Universal Binary
run: |
APP_PATH="CopilotMonitor/build/export/UsageBar.app"
APP_PATH="UsageBar/build/export/UsageBar.app"
MAIN_BIN="$APP_PATH/Contents/MacOS/UsageBar"
CLI_BIN="$APP_PATH/Contents/MacOS/usagebar-cli"

Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
run: |
VERSION_TAG="${{ steps.release_version.outputs.version_tag }}"
DIST_DIR="$RUNNER_TEMP/release-dist"
APP_PATH="CopilotMonitor/build/export/UsageBar.app"
APP_PATH="UsageBar/build/export/UsageBar.app"
ZIP_NAME="UsageBar-${VERSION_TAG}-unsigned.zip"
DMG_NAME="UsageBar-${VERSION_TAG}-unsigned.dmg"
DMG_STAGING="$RUNNER_TEMP/dmg_staging"
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CopilotMonitor/CopilotMonitor/Info.plist README.md README.zh-CN.md
git add UsageBar/UsageBar/Info.plist README.md README.zh-CN.md
git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.release_version.outputs.version_number }}"
git tag "${{ steps.release_version.outputs.version_tag }}"
git push origin HEAD:main "${{ steps.release_version.outputs.version_tag }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: macos-26
env:
XCODE_VERSION: '26.4'
PROJECT_FILE: CopilotMonitor.xcodeproj
SCHEME: CopilotMonitor
PROJECT_FILE: UsageBar.xcodeproj
SCHEME: UsageBar
defaults:
run:
working-directory: CopilotMonitor
working-directory: UsageBar

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ package-lock.json

# VSCode local settings
.vscode/settings.local.json
.vscode/.debug/

# Local runtime artifacts
data/
Expand All @@ -56,4 +57,6 @@ nohup.out
.pi
.pi-lens
.claude
.conductor/
.sc/
.mcp.json
1 change: 0 additions & 1 deletion .vscode/.debug/UsageBar.app

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"label": "🐛 Debug: Build for LLDB",
"type": "shell",
"command": "set -euo pipefail; xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug build; BUILT_PRODUCTS_DIR=$(xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug -showBuildSettings 2>/dev/null | sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1); if [ -z \"$BUILT_PRODUCTS_DIR\" ]; then echo 'Error: BUILT_PRODUCTS_DIR not found' >&2; exit 1; fi; mkdir -p .vscode/.debug; rm -f .vscode/.debug/UsageBar.app; ln -s \"$BUILT_PRODUCTS_DIR/UsageBar.app\" .vscode/.debug/UsageBar.app; echo \"LLDB bundle link prepared: .vscode/.debug/UsageBar.app\"",
"command": "set -euo pipefail; xcodebuild -project UsageBar/UsageBar.xcodeproj -scheme UsageBar -configuration Debug build; BUILT_PRODUCTS_DIR=$(xcodebuild -project UsageBar/UsageBar.xcodeproj -scheme UsageBar -configuration Debug -showBuildSettings 2>/dev/null | sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1); if [ -z \"$BUILT_PRODUCTS_DIR\" ]; then echo 'Error: BUILT_PRODUCTS_DIR not found' >&2; exit 1; fi; mkdir -p .vscode/.debug; rm -f .vscode/.debug/UsageBar.app; ln -s \"$BUILT_PRODUCTS_DIR/UsageBar.app\" .vscode/.debug/UsageBar.app; echo \"LLDB bundle link prepared: .vscode/.debug/UsageBar.app\"",
"group": "build",
"presentation": {
"reveal": "always",
Expand All @@ -18,7 +18,7 @@
{
"label": "🐛 Debug: Kill + Build + Run",
"type": "shell",
"command": "set -euo pipefail; pkill -x 'UsageBar' 2>/dev/null || true; xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug build; BUILT_PRODUCTS_DIR=$(xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug -showBuildSettings 2>/dev/null | sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1); if [ -z \"$BUILT_PRODUCTS_DIR\" ]; then echo 'Error: BUILT_PRODUCTS_DIR not found' >&2; exit 1; fi; mkdir -p .vscode/.debug; rm -f .vscode/.debug/UsageBar.app; ln -s \"$BUILT_PRODUCTS_DIR/UsageBar.app\" .vscode/.debug/UsageBar.app; open \"$BUILT_PRODUCTS_DIR/UsageBar.app\"",
"command": "set -euo pipefail; pkill -x 'UsageBar' 2>/dev/null || true; xcodebuild -project UsageBar/UsageBar.xcodeproj -scheme UsageBar -configuration Debug build; BUILT_PRODUCTS_DIR=$(xcodebuild -project UsageBar/UsageBar.xcodeproj -scheme UsageBar -configuration Debug -showBuildSettings 2>/dev/null | sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1); if [ -z \"$BUILT_PRODUCTS_DIR\" ]; then echo 'Error: BUILT_PRODUCTS_DIR not found' >&2; exit 1; fi; mkdir -p .vscode/.debug; rm -f .vscode/.debug/UsageBar.app; ln -s \"$BUILT_PRODUCTS_DIR/UsageBar.app\" .vscode/.debug/UsageBar.app; open \"$BUILT_PRODUCTS_DIR/UsageBar.app\"",
"group": {
"kind": "build",
"isDefault": true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lint: lint-swift lint-actions

lint-swift:
@echo "Running SwiftLint..."
@swiftlint lint CopilotMonitor/CopilotMonitor
@swiftlint lint UsageBar/UsageBar

lint-actions:
@echo "Running action-validator..."
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ make setup # Configure git hooks (SwiftLint + action-validator)

```bash
# Build
xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj \
-scheme CopilotMonitor -configuration Debug build
xcodebuild -project UsageBar/UsageBar.xcodeproj \
-scheme UsageBar -configuration Debug build

# Run (auto-detect build path)
open "$(xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj \
-scheme CopilotMonitor -configuration Debug -showBuildSettings 2>/dev/null \
open "$(xcodebuild -project UsageBar/UsageBar.xcodeproj \
-scheme UsageBar -configuration Debug -showBuildSettings 2>/dev/null \
| sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1)/UsageBar.app"
```

Expand Down
8 changes: 4 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ make setup # 配置 Git 钩子(SwiftLint + action-validator)

```bash
# 构建
xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj \
-scheme CopilotMonitor -configuration Debug build
xcodebuild -project UsageBar/UsageBar.xcodeproj \
-scheme UsageBar -configuration Debug build

# 运行(自动检测构建路径)
open "$(xcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj \
-scheme CopilotMonitor -configuration Debug -showBuildSettings 2>/dev/null \
open "$(xcodebuild -project UsageBar/UsageBar.xcodeproj \
-scheme UsageBar -configuration Debug -showBuildSettings 2>/dev/null \
| sed -n 's/^[[:space:]]*BUILT_PRODUCTS_DIR = //p' | head -n 1)/UsageBar.app"
```

Expand Down
File renamed without changes.
Loading
Loading