diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-09-09 14:23:24 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-09-09 14:23:24 +0800 |
| commit | 693137a6487e6ffda9ff15ade62d0e8bfec1bf49 (patch) | |
| tree | 12c078a35bebfd139d108f5fb7cd6c7fc4455c70 /.github | |
| parent | b9ab04cd6e253848bad865fc1b5ea993a2a060f3 (diff) | |
| parent | 8a9a3dc9d760db37bb963d3e5bfadafdd94ee08d (diff) | |
Merge branch '2025.06'
Diffstat (limited to '.github')
| -rw-r--r-- | .github/pull_request_template.md | 1 | ||||
| -rw-r--r-- | .github/workflows/qatest.yaml | 49 |
2 files changed, 37 insertions, 13 deletions
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 473498833e..5fe8870337 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -19,6 +19,7 @@ Issue Link: <!-- e.g., closes #123 or relates to #456 --> Please ensure the following before requesting review: - [ ] I have provided a clear title and detailed description for this pull request. +- [ ] If useful, I have included media such as screenshots and video to show off my changes. - [ ] The PR is linked to a relevant issue with sufficient context. - [ ] I have tested the changes locally and verified they work as intended. - [ ] All new and existing tests pass. diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 5d8894a3f4..4e10900441 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -46,11 +46,10 @@ jobs: runner: qa-dan-asus artifact: Windows-installer install-path: 'C:\viewer-automation-main' - # Commented out until mac runner is available - # - os: mac - # runner: qa-mac-atlas - # artifact: Mac-installer - # install-path: '$HOME/Documents/viewer-automation' + - os: mac + runner: qa-mac-atlas + artifact: macOS-installer + install-path: '$HOME/Documents/viewer-automation' fail-fast: false runs-on: [self-hosted, "${{ matrix.runner }}"] @@ -498,11 +497,13 @@ jobs: mkdir -p "$MOUNT_POINT" # Mount the DMG - hdiutil attach "${{ env.INSTALLER_PATH }}" -mountpoint "$MOUNT_POINT" -nobrowse + hdiutil attach "$INSTALLER_PATH" -mountpoint "$MOUNT_POINT" -nobrowse echo "✅ DMG mounted at $MOUNT_POINT" - # Find the app in the mounted DMG + echo "Installing application to default location from DMG..." + + # Find the .app bundle in the DMG APP_PATH=$(find "$MOUNT_POINT" -name "*.app" -type d | head -1) if [ -z "$APP_PATH" ]; then @@ -510,18 +511,40 @@ jobs: exit 1 fi - echo "Installing application to Applications folder..." + APP_NAME=$(basename "$APP_PATH") + DEST_PATH="/Applications/$APP_NAME" + + # Handle existing installation + if [ -d "$DEST_PATH" ]; then + echo "Found existing installation at: $DEST_PATH" + echo "Moving existing installation to trash..." + + # Move to trash instead of force removing + TRASH_PATH="$HOME/.Trash/$(date +%Y%m%d_%H%M%S)_$APP_NAME" + mv "$DEST_PATH" "$TRASH_PATH" || { + echo "⚠️ Could not move to trash, trying direct removal..." + rm -rf "$DEST_PATH" || { + echo "❌ Could not remove existing installation" + echo "Please manually remove: $DEST_PATH" + exit 1 + } + } + + echo "✅ Existing installation handled successfully" + fi - # Copy the app to the Applications folder (or specified install path) - cp -R "$APP_PATH" "${{ matrix.install-path }}" + # Copy the .app to /Applications + echo "Copying app from: $APP_PATH" + echo "To destination: /Applications/" + cp -R "$APP_PATH" /Applications/ # Verify the app was copied successfully - if [ ! -d "${{ matrix.install-path }}/$(basename "$APP_PATH")" ]; then - echo "❌ Error: Failed to install application to ${{ matrix.install-path }}!" + if [ ! -d "$DEST_PATH" ]; then + echo "❌ Error: Failed to install application to /Applications!" exit 1 fi - echo "✅ Application installed successfully to ${{ matrix.install-path }}" + echo "✅ Application installed successfully to /Applications" # Save mount point for cleanup echo "MOUNT_POINT=$MOUNT_POINT" >> $GITHUB_ENV |
