refactor: rename the project to usage-monitor

Rename the crate, binary, product name, identifier, settings folder, log
file, autostart entry, user agent, updater endpoint and release assets.
Legacy Win32 clients still update: they fall back to the first .exe asset,
and the legacy rollback workflow reads the package name from the ref it
builds. Upgraded installs start with default settings.
This commit is contained in:
tiennm99 committed 2026-10-22 16:59:32 +07:00
1 parent 88d39feeb1
commit 6afd603d5e
44 files changed
+224 -202

No files matched your search

+2 -2
View File
@@ -67,7 +67,7 @@ jobs:
run: |
$match = Select-String -Path Cargo.toml -Pattern '^version\s*=\s*"([^"]+)"' | Select-Object -First 1
$cargoVersion = $match.Matches.Groups[1].Value
$info = (Get-Item target/release/claude-code-usage-bubble.exe).VersionInfo
$info = (Get-Item target/release/usage-monitor.exe).VersionInfo
$info | Format-List ProductName, CompanyName, FileDescription, FileVersion, ProductVersion, LegalCopyright
if ($info.ProductVersion -ne $cargoVersion) {
Write-Error "ProductVersion '$($info.ProductVersion)' does not match Cargo.toml version '$cargoVersion'"
@@ -79,7 +79,7 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: bubble-exe-${{ github.sha }}
path: target/release/claude-code-usage-bubble.exe
path: target/release/usage-monitor.exe
retention-days: 7
if-no-files-found: error
+19 -6
View File
@@ -105,9 +105,17 @@ jobs:
echo "::error::Cargo.toml version is '$actual' after patching, expected '$VERSION'."
exit 1
fi
sed -i -E '/^name = "claude-code-usage-bubble"\r?$/{n;s/^version = "[^"]*"(\r?)$/version = "'"$VERSION"'"\1/}' Cargo.lock
if ! tr -d '\r' < Cargo.lock | grep -A1 -x 'name = "claude-code-usage-bubble"' | grep -qx "version = \"$VERSION\""; then
echo "::error::Cargo.lock has no claude-code-usage-bubble entry at version '$VERSION' after patching."
# Refs from before the rename use the old package name, so read it
# from the ref instead of naming it here.
crate=$(tr -d '\r' < Cargo.toml | sed -nE 's/^name[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' | head -n 1)
if [ -z "$crate" ]; then
echo "::error::Cargo.toml has no package name."
exit 1
fi
echo "CRATE=$crate" >> "$GITHUB_ENV"
sed -i -E '/^name = "'"$crate"'"\r?$/{n;s/^version = "[^"]*"(\r?)$/version = "'"$VERSION"'"\1/}' Cargo.lock
if ! tr -d '\r' < Cargo.lock | grep -A1 -x "name = \"$crate\"" | grep -qx "version = \"$VERSION\""; then
echo "::error::Cargo.lock has no $crate entry at version '$VERSION' after patching."
exit 1
fi
@@ -118,8 +126,13 @@ jobs:
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
# The release always carries the exe as `usage-monitor.exe`, whatever
# the ref named it, and a copy keeps the bytes the digest covers.
run: |
exe=target/release/claude-code-usage-bubble.exe
exe=target/release/usage-monitor.exe
if [ "$CRATE" != usage-monitor ]; then
cp "target/release/$CRATE.exe" "$exe"
fi
npm exec --prefix current --no -- tauri signer sign --app-version "$VERSION" "$exe"
test -s "$exe.sig"
@@ -127,8 +140,8 @@ jobs:
with:
name: release-legacy-win-x64
path: |
target/release/claude-code-usage-bubble.exe
target/release/claude-code-usage-bubble.exe.sig
target/release/usage-monitor.exe
target/release/usage-monitor.exe.sig
retention-days: 7
if-no-files-found: error
+4 -4
View File
@@ -120,7 +120,7 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
exe=target/release/claude-code-usage-bubble.exe
exe=target/release/usage-monitor.exe
npx tauri signer sign --app-version "$VERSION" "$exe"
test -s "$exe.sig"
@@ -128,8 +128,8 @@ jobs:
with:
name: release-win-x64
path: |
target/release/claude-code-usage-bubble.exe
target/release/claude-code-usage-bubble.exe.sig
target/release/usage-monitor.exe
target/release/usage-monitor.exe.sig
retention-days: 7
if-no-files-found: error
@@ -201,7 +201,7 @@ jobs:
}
appimage=$(one target/release/bundle/appimage/*_amd64.AppImage)
deb=$(one target/release/bundle/deb/*_amd64.deb)
name="claude-code-usage-bubble_${VERSION}_amd64"
name="usage-monitor_${VERSION}_amd64"
mkdir -p dist
cp "$appimage" "dist/$name.AppImage"
cp "$appimage.sig" "dist/$name.AppImage.sig"