Package macOS release as zip to preserve executable bit and clarify mac install steps#18
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where macOS users couldn't execute the downloaded CloudBridge binary because the executable permission bit was lost during download. The solution packages macOS releases as zip files to preserve file permissions and updates the documentation with clearer installation instructions.
Changes:
- Workflow: Modified the macOS artifact preparation to zip the binary before upload, preserving the executable bit
- Documentation: Updated macOS download links to reference
.zipfiles and added detailed unzip/chmod instructions for users encountering issues
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Added zip packaging step for macOS artifacts and updated asset names to include .zip extension |
README.md |
Updated macOS download links to .zip format and enhanced installation instructions with troubleshooting guidance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "cloudbridge-macos-arm64" | ||
| chmod +x "cloudbridge-macos-arm64" | ||
| zip -j "${{ matrix.asset_name }}" "cloudbridge-macos-arm64" |
There was a problem hiding this comment.
The filename is hardcoded as "cloudbridge-macos-arm64" but this step runs for all macOS builds (if any Intel builds are added in the future). Consider using a dynamic approach that derives the filename from the matrix variables to avoid future issues. For example, you could extract the base name from the asset_name by removing the .zip extension.
| cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "cloudbridge-macos-arm64" | |
| chmod +x "cloudbridge-macos-arm64" | |
| zip -j "${{ matrix.asset_name }}" "cloudbridge-macos-arm64" | |
| asset_name="${{ matrix.asset_name }}" | |
| base_name="${asset_name%.zip}" | |
| cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "$base_name" | |
| chmod +x "$base_name" | |
| zip -j "$asset_name" "$base_name" |
| cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "cloudbridge-macos-arm64" | ||
| chmod +x "cloudbridge-macos-arm64" | ||
| zip -j "${{ matrix.asset_name }}" "cloudbridge-macos-arm64" |
There was a problem hiding this comment.
The filename is hardcoded as "cloudbridge-macos-arm64" but this step runs for all macOS builds. This will break if an Intel macOS build (x64) is added to the matrix in the future. Consider using a dynamic approach that extracts the base name from matrix.asset_name by removing the .zip extension, such as: filename="${{ matrix.asset_name%.zip }}" followed by cp ... "$filename" and zip -j "${{ matrix.asset_name }}" "$filename".
| cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "cloudbridge-macos-arm64" | |
| chmod +x "cloudbridge-macos-arm64" | |
| zip -j "${{ matrix.asset_name }}" "cloudbridge-macos-arm64" | |
| filename="${{ matrix.asset_name }}" | |
| filename="${filename%.zip}" | |
| cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "$filename" | |
| chmod +x "$filename" | |
| zip -j "${{ matrix.asset_name }}" "$filename" |
| | Windows (x64) | `cloudbridge-windows-x64.exe` | | ||
| | macOS (Intel) | `cloudbridge-macos-x64` | | ||
| | macOS (Apple Silicon) | `cloudbridge-macos-arm64` | | ||
| | macOS (Intel) | `cloudbridge-macos-x64.zip` | |
There was a problem hiding this comment.
The README documents a macOS Intel (x64) build with the file cloudbridge-macos-x64.zip, but there is no corresponding build configuration in the workflow matrix. Currently, only the ARM64 build (Apple Silicon) is configured in the matrix at line 26-29. Either add a macOS Intel build to the workflow matrix, or remove this row from the README table to avoid misleading users.
macOS users were seeing the downloaded
cloudbridge-macos-arm64open as a text document due to lost executable metadata..github/workflows/release.yml)..zipand add unzip/chmod guidance to avoid Finder’s “text encoding” error (README.md).Example (workflow change):