diff --git a/.github/workflows/update-homebrew.yml b/.github/workflows/update-homebrew.yml index 967cb442..b8c4d705 100644 --- a/.github/workflows/update-homebrew.yml +++ b/.github/workflows/update-homebrew.yml @@ -37,11 +37,22 @@ jobs: echo "Could not determine version" >&2 exit 1 fi + if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "Invalid version: ${VERSION}" >&2 + exit 1 + fi + echo "Skipping homebrew cask update for non-release ref: ${VERSION}" + echo "skip=true" >> $GITHUB_OUTPUT + exit 0 + fi + echo "skip=false" >> $GITHUB_OUTPUT echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Updating homebrew cask to version $VERSION" - name: Download DMG and get SHA256 id: sha + if: steps.version.outputs.skip != 'true' run: | VERSION="${{ steps.version.outputs.version }}" URL="https://github.com/manaflow-ai/cmux/releases/download/v${VERSION}/cmux-macos.dmg" @@ -65,6 +76,7 @@ jobs: echo "DMG SHA256: $SHA256" - name: Checkout homebrew-cmux + if: steps.version.outputs.skip != 'true' uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: repository: manaflow-ai/homebrew-cmux @@ -72,6 +84,7 @@ jobs: path: homebrew-cmux - name: Update cask formula + if: steps.version.outputs.skip != 'true' env: VERSION: ${{ steps.version.outputs.version }} SHA256: ${{ steps.sha.outputs.sha256 }} @@ -107,6 +120,7 @@ jobs: sed -i 's/^ //' homebrew-cmux/Casks/cmux.rb - name: Verify cask SHA matches DMG + if: steps.version.outputs.skip != 'true' run: | CASK_SHA=$(grep 'sha256' homebrew-cmux/Casks/cmux.rb | sed 's/.*"\(.*\)".*/\1/') ACTUAL_SHA=$(shasum -a 256 cmux.dmg | cut -d' ' -f1) @@ -117,6 +131,7 @@ jobs: echo "SHA verification passed: $CASK_SHA" - name: Commit and push + if: steps.version.outputs.skip != 'true' env: VERSION: ${{ steps.version.outputs.version }} run: | diff --git a/cmuxTests/CmuxWebViewKeyEquivalentTests.swift b/cmuxTests/CmuxWebViewKeyEquivalentTests.swift index 3216a55d..367b62e3 100644 --- a/cmuxTests/CmuxWebViewKeyEquivalentTests.swift +++ b/cmuxTests/CmuxWebViewKeyEquivalentTests.swift @@ -9957,6 +9957,7 @@ final class GhosttySurfaceOverlayTests: XCTestCase { ) } + @MainActor func testKeyboardCopyModeIndicatorMountsAndUnmounts() { let surface = TerminalSurface( tabId: UUID(), @@ -9967,10 +9968,10 @@ final class GhosttySurfaceOverlayTests: XCTestCase { let hostedView = surface.hostedView XCTAssertFalse(hostedView.debugHasKeyboardCopyModeIndicator()) - hostedView.setKeyboardCopyModeIndicator(visible: true) + hostedView.syncKeyStateIndicator(text: "vim") XCTAssertTrue(hostedView.debugHasKeyboardCopyModeIndicator()) - hostedView.setKeyboardCopyModeIndicator(visible: false) + hostedView.syncKeyStateIndicator(text: nil) XCTAssertFalse(hostedView.debugHasKeyboardCopyModeIndicator()) }