diff --git a/.gitea/workflows/test-macos-build.yml b/.gitea/workflows/test-macos-build.yml index 75679e6c..cc973eab 100644 --- a/.gitea/workflows/test-macos-build.yml +++ b/.gitea/workflows/test-macos-build.yml @@ -45,47 +45,46 @@ jobs: # Find the app bundle - name: Find app bundle run: | - if [ -z "$APP_PATH" ]; then - # First check Saved/StagedBuilds directory - where Unreal often places built apps - echo "Checking Saved/StagedBuilds directory..." - APP_PATHS=$(find ./Saved/StagedBuilds -type d -name "*.app" 2>/dev/null) - - # If not found, check Builds directory - if [ -z "$APP_PATHS" ]; then - echo "Checking Builds directory..." - APP_PATHS=$(find ./Builds -type d -name "*.app" 2>/dev/null) - fi - - # If still not found, check the whole workspace - if [ -z "$APP_PATHS" ]; then - echo "Checking entire workspace..." - APP_PATHS=$(find . -type d -name "*.app" -not -path "*/\.*" 2>/dev/null) - fi - - if [ -z "$APP_PATHS" ]; then - echo "ERROR: Could not find any app bundles!" - echo "Listing all directories to help debug:" - find . -type d -maxdepth 3 | sort - exit 1 - fi - - echo "Found potential app bundles:" - echo "$APP_PATHS" - - # Use the first app path found (preferably the main app, not a child app) - MAIN_APP_PATH=$(echo "$APP_PATHS" | grep -v "CrashReportClient" | head -1 || echo "$APP_PATHS" | head -1) - - echo "Using app bundle: $MAIN_APP_PATH" - echo "APP_PATH=$MAIN_APP_PATH" >> "$GITHUB_ENV" - else - echo "App path already set: $APP_PATH" + # First check Saved/StagedBuilds directory - where Unreal often places built apps + echo "Checking Saved/StagedBuilds directory..." + APP_PATHS=$(find ./Saved/StagedBuilds -type d -name "*.app" 2>/dev/null) + + # If not found, check Builds directory + if [ -z "$APP_PATHS" ]; then + echo "Checking Builds directory..." + APP_PATHS=$(find ./Builds -type d -name "*.app" 2>/dev/null) fi - # Make sure app exists - if [ ! -d "$APP_PATH" ]; then - echo "ERROR: App bundle not found at $APP_PATH!" + # If still not found, check the whole workspace + if [ -z "$APP_PATHS" ]; then + echo "Checking entire workspace..." + APP_PATHS=$(find . -type d -name "*.app" -not -path "*/\.*" 2>/dev/null) + fi + + if [ -z "$APP_PATHS" ]; then + echo "ERROR: Could not find any app bundles!" + echo "Listing all directories to help debug:" + find . -type d -maxdepth 3 | sort exit 1 fi + + echo "Found potential app bundles:" + echo "$APP_PATHS" + + # Use the first app path found (preferably the main app, not a child app) + MAIN_APP_PATH=$(echo "$APP_PATHS" | grep -v "CrashReportClient" | head -1 || echo "$APP_PATHS" | head -1) + + echo "Using app bundle: $MAIN_APP_PATH" + echo "APP_PATH=$MAIN_APP_PATH" >> "$GITHUB_ENV" + + # Make sure app exists - using local variable + if [ ! -d "$MAIN_APP_PATH" ]; then + echo "ERROR: App bundle not found at $MAIN_APP_PATH!" + exit 1 + fi + + # Export APP_PATH for next steps to use + echo "APP_PATH=$MAIN_APP_PATH" >> "$GITHUB_ENV" shell: bash # Use the macos-notarize action to sign and notarize the app