From 0848fce02c89c7c7fd31c58ce589338740558b9b Mon Sep 17 00:00:00 2001 From: Mitriyweb <4174322+Mitriyweb@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:57:51 +0000 Subject: [PATCH] fix: rebase on main and unify macOS installer naming (v4) - Rebased on latest main and resolved conflicts in .github/workflows/macos-release.yml, docs/installation-macos.md, homebrew-chaseai/Formula/chaseai.rb, and scripts/install.sh. - Unified all binary and DMG naming to use `chase-ai-` prefix. - Improved `scripts/install.sh` with better error handling, 404 detection, and fallback from tar.gz to DMG. - Updated `.github/workflows/macos-release.yml` for consistent naming and formula updates. - Corrected documentation links and Homebrew installation instructions to use `mitriyweb/chaseai`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- .github/workflows/macos-release.yml | 8 ++-- docs/installation-macos.md | 6 +-- homebrew-chaseai/Formula/chaseai.rb | 4 +- scripts/install.sh | 61 ++++++++++++++++++++--------- 4 files changed, 51 insertions(+), 28 deletions(-) diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index 8f8926c..c5b8744 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -207,7 +207,7 @@ jobs: ## macOS Distribution ### DMG Installer - - Download `chaseai-${{ needs.check-version.outputs.version }}-macos.dmg` + - Download `chase-ai-${{ needs.check-version.outputs.version }}-macos.dmg` - Mount the DMG and drag ChaseAI to Applications folder - Verify checksum: `shasum -a 256 -c checksums.sha256` @@ -218,7 +218,7 @@ jobs: ### Homebrew Installation ```bash - brew tap chaseai/chaseai + brew tap mitriyweb/chaseai brew install chaseai ``` @@ -277,8 +277,8 @@ jobs: cat > homebrew-tap/Formula/chaseai.rb << 'EOF' class Chaseai < Formula desc "Local control and orchestration system for AI agents" - homepage "https://github.com/chaseai/chaseai" - url "https://github.com/chaseai/chaseai/releases/download/v#{version}/chaseai-#{version}-macos.dmg" + homepage "https://github.com/Mitriyweb/ChaseAI" + url "https://github.com/Mitriyweb/ChaseAI/releases/download/v#{version}/chase-ai-#{version}-macos.dmg" sha256 "${{ steps.checksum.outputs.sha256 }}" version "${{ needs.check-version.outputs.version }}" diff --git a/docs/installation-macos.md b/docs/installation-macos.md index a7dd63a..df8fc5f 100644 --- a/docs/installation-macos.md +++ b/docs/installation-macos.md @@ -70,7 +70,7 @@ Homebrew provides easy installation and updates via the command line. 1. **Add the ChaseAI Tap** ```bash - brew tap chaseai/chaseai + brew tap mitriyweb/chaseai ``` 2. **Install ChaseAI** @@ -143,7 +143,7 @@ The ChaseAI tap has not been added to your Homebrew installation. Add the tap and try again: ```bash -brew tap chaseai/chaseai +brew tap mitriyweb/chaseai brew install chaseai ``` @@ -181,7 +181,7 @@ If you have an older version and `brew upgrade` doesn't work: ```bash # Remove and reinstall brew uninstall chaseai -brew tap --repair chaseai/chaseai +brew tap --repair mitriyweb/chaseai brew install chaseai ``` diff --git a/homebrew-chaseai/Formula/chaseai.rb b/homebrew-chaseai/Formula/chaseai.rb index e03fb24..00a90d8 100644 --- a/homebrew-chaseai/Formula/chaseai.rb +++ b/homebrew-chaseai/Formula/chaseai.rb @@ -3,8 +3,8 @@ class Chaseai < Formula desc "Local control and orchestration system for AI agents" - homepage "https://github.com/chaseai/chaseai" - url "https://github.com/chaseai/chaseai/releases/download/v0.1.0/chase-ai-0.1.0-macos.dmg" + homepage "https://github.com/Mitriyweb/ChaseAI" + url "https://github.com/Mitriyweb/ChaseAI/releases/download/v#{version}/chase-ai-#{version}-macos.dmg" sha256 "0000000000000000000000000000000000000000000000000000000000000000" version "0.1.0" diff --git a/scripts/install.sh b/scripts/install.sh index c2ee648..9b4cac7 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -36,19 +36,28 @@ fi echo " Latest version: $LATEST_RELEASE" -# Try to download tar.gz archive +# Try to download tar.gz archive (preferred for script-based install) ARCHIVE_URL="https://github.com/$REPO/releases/download/v$LATEST_RELEASE/chase-ai-$LATEST_RELEASE-macos.tar.gz" ARCHIVE_FILE="/tmp/chase-ai-$LATEST_RELEASE.tar.gz" echo "📦 Downloading ChaseAI $LATEST_RELEASE..." -if ! curl -L -o "$ARCHIVE_FILE" "$ARCHIVE_URL"; then - echo -e "${RED}❌ Error: Failed to download ChaseAI${NC}" - exit 1 +if ! curl -sL -f -o "$ARCHIVE_FILE" "$ARCHIVE_URL"; then + echo -e "${YELLOW}⚠ Warning: Failed to download tar.gz, trying DMG fallback...${NC}" + DMG_URL="https://github.com/$REPO/releases/download/v$LATEST_RELEASE/chase-ai-$LATEST_RELEASE-macos.dmg" + ARCHIVE_FILE="/tmp/chase-ai-$LATEST_RELEASE.dmg" + if ! curl -sL -f -o "$ARCHIVE_FILE" "$DMG_URL"; then + echo -e "${RED}❌ Error: Failed to download both tar.gz and DMG${NC}" + exit 1 + fi + IS_DMG=true +else + IS_DMG=false fi -# Verify file is not empty -if [ ! -s "$ARCHIVE_FILE" ]; then - echo -e "${RED}❌ Error: Downloaded file is empty${NC}" +# Verify file is not empty and not a 404 page +FILE_SIZE=$(stat -f%z "$ARCHIVE_FILE" 2>/dev/null || stat -c%s "$ARCHIVE_FILE" 2>/dev/null || echo "0") +if [ "$FILE_SIZE" -lt 1000 ]; then + echo -e "${RED}❌ Error: Downloaded file is too small ($FILE_SIZE bytes). It might be a 404 page.${NC}" rm -f "$ARCHIVE_FILE" exit 1 fi @@ -59,11 +68,11 @@ CHECKSUMS_FILE="/tmp/checksums.sha256" if curl -s -f "$CHECKSUMS_URL" > "$CHECKSUMS_FILE" 2>/dev/null && [ -s "$CHECKSUMS_FILE" ]; then echo "🔐 Verifying checksum..." - # Extract the expected checksum for our archive file - EXPECTED_CHECKSUM=$(grep "chase-ai-$LATEST_RELEASE-macos.tar.gz" "$CHECKSUMS_FILE" | awk '{print $1}') + FILENAME=$(basename "$ARCHIVE_FILE") + EXPECTED_CHECKSUM=$(grep "$FILENAME" "$CHECKSUMS_FILE" | awk '{print $1}') if [ -z "$EXPECTED_CHECKSUM" ]; then - echo -e "${YELLOW}⚠ Warning: Could not find checksum for archive file${NC}" + echo -e "${YELLOW}⚠ Warning: Could not find checksum for $FILENAME in checksums.sha256${NC}" else # Calculate actual checksum ACTUAL_CHECKSUM=$(shasum -a 256 "$ARCHIVE_FILE" | awk '{print $1}') @@ -79,26 +88,40 @@ if curl -s -f "$CHECKSUMS_URL" > "$CHECKSUMS_FILE" 2>/dev/null && [ -s "$CHECKSU fi fi else - echo -e "${YELLOW}⚠ Warning: Could not download checksums file, skipping verification${NC}" + echo -e "${YELLOW}⚠ Warning: Could not download checksums.sha256 file, skipping verification${NC}" fi -# Extract archive -echo "📂 Extracting archive..." -TEMP_DIR=$(mktemp -d) -tar -xzf "$ARCHIVE_FILE" -C "$TEMP_DIR" +# Extract and install +echo "📂 Installing..." +MOUNT_POINT=$(mktemp -d) + +if [ "$IS_DMG" = true ]; then + echo " Mounting DMG..." + hdiutil attach "$ARCHIVE_FILE" -mountpoint "$MOUNT_POINT" -nobrowse + SOURCE_PATH="$MOUNT_POINT/$APP_NAME" +else + echo " Extracting archive..." + tar -xzf "$ARCHIVE_FILE" -C "$MOUNT_POINT" + SOURCE_PATH="$MOUNT_POINT/$APP_NAME" +fi # Copy app to Applications -echo "📋 Installing ChaseAI to $INSTALL_DIR..." +echo "📋 Copying to $INSTALL_DIR..." if [ -d "$INSTALL_DIR/$APP_NAME" ]; then echo " Removing existing installation..." rm -rf "$INSTALL_DIR/$APP_NAME" fi -cp -r "$TEMP_DIR/$APP_NAME" "$INSTALL_DIR/" +cp -r "$SOURCE_PATH" "$INSTALL_DIR/" + +# Cleanup +if [ "$IS_DMG" = true ]; then + echo " Unmounting DMG..." + hdiutil detach "$MOUNT_POINT" +fi -# Clean up rm -f "$ARCHIVE_FILE" -rm -rf "$TEMP_DIR" +rm -rf "$MOUNT_POINT" # Verify installation if [ -d "$INSTALL_DIR/$APP_NAME" ]; then