From 93c5ca0ed5057565bb3a3c0c4f4002f361f71729 Mon Sep 17 00:00:00 2001 From: Dylan Ratcliffe Date: Mon, 4 Mar 2024 12:17:24 +0000 Subject: [PATCH] Remove raw binary artifacts --- .github/workflows/release.yml | 14 ------- build/extract-bin-from-dmg.sh | 72 ----------------------------------- 2 files changed, 86 deletions(-) delete mode 100755 build/extract-bin-from-dmg.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef1fb43c..4ed9a451 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,20 +40,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AC_PASSWORD: ${{ secrets.APPLE_AC_PASSWORD }} - # Run build/extract-bin-from-dmg.sh to extract the binary from the DMG - - name: Extract binaries from DMG - run: | - ./build/extract-bin-from-dmg.sh overmind-cli-amd64 - ./build/extract-bin-from-dmg.sh overmind-cli-arm64 - - # Add the raw signed binaries to the existing release - - name: Upload raw signed Mac binaries (amd64 and arm64) - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: dist/signed-binaries/* - file_glob: true - bump-formula: # Depend on the release job needs: release diff --git a/build/extract-bin-from-dmg.sh b/build/extract-bin-from-dmg.sh deleted file mode 100755 index 85030a70..00000000 --- a/build/extract-bin-from-dmg.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Ensure BUILD_NAME is provided as the first argument -if [ $# -lt 1 ]; then - echo "Usage: $0 " - exit 1 -fi - -BUILD_NAME="$1" # Set BUILD_NAME from the script argument -BUILD_PATH="dist/signed-binaries" - -# Define source DMG file and destination directory -SOURCE_DMG="dist/${BUILD_NAME}.dmg" - -echo "Starting the process with BUILD_NAME: $BUILD_NAME" - -# Attempt to mount the DMG file and capture the output -echo "Attempting to mount DMG file: $SOURCE_DMG" -MOUNT_OUTPUT=$(hdiutil attach "$SOURCE_DMG" 2>&1) - -# Capture the exit status of the mount command -MOUNT_STATUS=$? - -echo "$MOUNT_OUTPUT" - -if [ $MOUNT_STATUS -ne 0 ]; then - echo "Error: Failed to mount the DMG file. Exiting." - exit 1 -else - MOUNT_DIR=$(echo "$MOUNT_OUTPUT" | grep -o '/Volumes/.*$') - echo "Success: Mounted at $MOUNT_DIR" -fi - -# Ensure the destination directory exists or create it -if [ ! -d "$BUILD_PATH" ]; then - echo "Destination directory not found. Creating path: $BUILD_PATH" - mkdir -p "$BUILD_PATH" - if [ $? -ne 0 ]; then - echo "Error: Failed to create destination directory. Exiting." - exit 1 - else - echo "Successfully created destination directory." - fi -else - echo "Destination directory already exists. Continuing." -fi - -# Copy files to the destination -echo "Copying Overmind binary to ${BUILD_PATH}/${BUILD_NAME}-darwin" -cp -R "${MOUNT_DIR}/overmind" "${BUILD_PATH}/${BUILD_NAME}-darwin" -if [ $? -ne 0 ]; then - echo "Error: Failed to copy files. Exiting." - hdiutil detach "$(echo $MOUNT_DIR | sed 's/ /\\ /g')" - exit 1 -else - echo "Successfully copied Overmind binary." -fi - -# Attempt to unmount the DMG and capture the output -echo "Attempting to unmount DMG at $MOUNT_DIR" -UNMOUNT_OUTPUT=$(hdiutil detach "$(echo $MOUNT_DIR | sed 's/ /\\ /g')" 2>&1) -UNMOUNT_STATUS=$? - -echo "$UNMOUNT_OUTPUT" - -if [ $UNMOUNT_STATUS -ne 0 ]; then - echo "Warning: Failed to unmount DMG cleanly. Manual cleanup might be required." -else - echo "DMG unmounted successfully." -fi - -echo "Process complete. Exiting." \ No newline at end of file