Skip to content

Commit c2d6332

Browse files
committed
Clean up
Try fix linux run FIx execute permission for post build scripts Test Test Format code chore: update scripts/update-android-gradle-plugin.sh to 5.11.0 (#1078) Co-authored-by: GitHub <[email protected]> Test with larger runners Revert test changes Try without sentry init Fix editor executable Test Test Remove target name param Test Test Try comment commandlet execution Restore commandlet execution Move commadlet to runtime module Fix commandlet context Test Test test Revert "test" This reverts commit a6f7d76.
1 parent 827a58b commit c2d6332

12 files changed

+69
-362
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
## Unreleased
44

5-
### Features
5+
### Dependencies
66

7-
- Add commandlet for debug symbols upload ([#1076](https://github.com/getsentry/sentry-unreal/pull/1076))
7+
- Bump Android Gradle Plugin from v5.10.0 to v5.11.0 ([#1078](https://github.com/getsentry/sentry-unreal/pull/1078))
8+
- [changelog](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/CHANGELOG.md#5110)
9+
- [diff](https://github.com/getsentry/sentry-android-gradle-plugin/compare/5.10.0...5.11.0)
810

911
## 1.1.1
1012

plugin-dev/Scripts/post-build-steps-linux.sh

100644100755
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
TARGET_PLATFORM="$1"
4-
TARGET_NAME="$2"
5-
TARGET_TYPE="$3"
6-
TARGET_CONFIGURATION="$4"
7-
PROJECT_FILE="$5"
8-
PLUGIN_DIR="$6"
9-
ENGINE_DIR="$7"
4+
TARGET_TYPE="$2"
5+
TARGET_CONFIGURATION="$3"
6+
PROJECT_FILE="$4"
7+
PLUGIN_DIR="$5"
8+
ENGINE_DIR="$6"
109

1110
# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions)
1211
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" ]; then
1312
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64"
1413
fi
1514

15+
# Skip commandlet execution for Editor target type
16+
if [ "$TARGET_TYPE" = "Editor" ]; then
17+
echo "Skipping SentrySymbolUpload commandlet for Editor target type"
18+
exit 0
19+
fi
20+
1621
ENGINE_VERSION=$(grep -o '"EngineAssociation": *"[^"]*"' "$PROJECT_FILE" | cut -d'"' -f4)
1722

1823
if [ "$(printf %.1s "$ENGINE_VERSION")" = "4" ]; then
19-
EDITOR_EXE="$ENGINE_DIR/Binaries/Linux/UE4Editor"
24+
EDITOR_EXE="$ENGINE_DIR/Binaries/Linux/UE4Editor-Cmd"
2025
else
21-
EDITOR_EXE="$ENGINE_DIR/Binaries/Linux/UnrealEditor"
26+
EDITOR_EXE="$ENGINE_DIR/Binaries/Linux/UnrealEditor-Cmd"
2227
fi
2328

24-
"$EDITOR_EXE" "$PROJECT_FILE" -run=SentrySymbolUpload -target-platform="$TARGET_PLATFORM" -target-name="$TARGET_NAME" -target-type="$TARGET_TYPE" -target-configuration="$TARGET_CONFIGURATION" -unattended -nopause -nullrhi
29+
"$EDITOR_EXE" "$PROJECT_FILE" -run=SentrySymbolUpload -target-platform="$TARGET_PLATFORM" -target-type="$TARGET_TYPE" -target-configuration="$TARGET_CONFIGURATION" -unattended -nopause -stdout -CrashForUAT

plugin-dev/Scripts/post-build-steps-mac.sh

100644100755
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
TARGET_PLATFORM="$1"
4-
TARGET_NAME="$2"
5-
TARGET_TYPE="$3"
6-
TARGET_CONFIGURATION="$4"
7-
PROJECT_FILE="$5"
8-
PLUGIN_DIR="$6"
9-
ENGINE_DIR="$7"
4+
TARGET_TYPE="$2"
5+
TARGET_CONFIGURATION="$3"
6+
PROJECT_FILE="$4"
7+
PLUGIN_DIR="$5"
8+
ENGINE_DIR="$6"
109

1110
# Copy sentry.dylib to plugin's Binaries\Mac dir if it doesn't exist there to ensure FAB version of the plugin works correctly - Epic obfuscates any extra binaries when pre-building the plugin
1211
if [ "$TARGET_PLATFORM" = "Mac" ] && [ ! -f "$PLUGIN_DIR/Binaries/Mac/sentry.dylib" ]; then
@@ -18,12 +17,18 @@ if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal" ]; then
1817
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal"
1918
fi
2019

20+
# Skip commandlet execution for Editor target type
21+
if [ "$TARGET_TYPE" = "Editor" ]; then
22+
echo "Skipping SentrySymbolUpload commandlet for Editor target type"
23+
exit 0
24+
fi
25+
2126
ENGINE_VERSION=$(grep -o '"EngineAssociation": *"[^"]*"' "$PROJECT_FILE" | cut -d'"' -f4)
2227

2328
if [[ "${ENGINE_VERSION:0:1}" == "4" ]]; then
24-
EDITOR_EXE="$ENGINE_DIR/Binaries/Mac/UE4Editor"
29+
EDITOR_EXE="$ENGINE_DIR/Binaries/Mac/UE4Editor-Cmd"
2530
else
26-
EDITOR_EXE="$ENGINE_DIR/Binaries/Mac/UnrealEditor"
31+
EDITOR_EXE="$ENGINE_DIR/Binaries/Mac/UnrealEditor-Cmd"
2732
fi
2833

29-
"$EDITOR_EXE" "$PROJECT_FILE" -run=SentrySymbolUpload -target-platform="$TARGET_PLATFORM" -target-name="$TARGET_NAME" -target-type="$TARGET_TYPE" -target-configuration="$TARGET_CONFIGURATION" -unattended -nopause -nullrhi
34+
"$EDITOR_EXE" "$PROJECT_FILE" -run=SentrySymbolUpload -target-platform="$TARGET_PLATFORM" -target-type="$TARGET_TYPE" -target-configuration="$TARGET_CONFIGURATION" -unattended -nopause
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
@echo off
2+
23
setlocal enabledelayedexpansion
34

45
set "TARGET_PLATFORM=%~1"
5-
set "TARGET_NAME=%~2"
6-
set "TARGET_TYPE=%~3"
7-
set "TARGET_CONFIGURATION=%~4"
8-
set "PROJECT_FILE=%~5"
9-
set "PLUGIN_DIR=%~6"
10-
set "ENGINE_DIR=%~7"
6+
set "TARGET_TYPE=%~2"
7+
set "TARGET_CONFIGURATION=%~3"
8+
set "PROJECT_FILE=%~4"
9+
set "PLUGIN_DIR=%~5"
10+
set "ENGINE_DIR=%~6"
1111

1212
:: Copy crashpad handler executable to plugin's Binaries\Linux dir if it doesn't exist there to enable cross-compilation for Linux on Windows with FAB version of the plugin
1313
set "CRASHPAD_HANDLER_LINUX=%PLUGIN_DIR%\Binaries\Linux\crashpad_handler"
@@ -21,11 +21,19 @@ if "%TARGET_PLATFORM%"=="Win64" (
2121
if not exist "%CRASHPAD_HANDLER_WIN%" (xcopy "%PLUGIN_DIR%\Source\ThirdParty\Win64\Crashpad\bin\*" "%PLUGIN_DIR%\Binaries\Win64\" /F /R /Y /I)
2222
)
2323

24+
:: Skip commandlet execution for Editor target type
25+
if "%TARGET_TYPE%"=="Editor" (
26+
echo Sentry: Automatic symbols upload is not required for Editor target. Skipping...
27+
exit /B 0
28+
)
29+
2430
for /f "tokens=2 delims=:, " %%i in ('type "%PROJECT_FILE%" ^| findstr /C:"EngineAssociation"') do set "ENGINE_VERSION=%%~i"
2531
set "ENGINE_VERSION=!ENGINE_VERSION:~0,1!"
2632

2733
if "!ENGINE_VERSION!"=="4" (set "EDITOR_EXE=%ENGINE_DIR%\Binaries\Win64\UE4Editor-Cmd.exe") else (set "EDITOR_EXE=%ENGINE_DIR%\Binaries\Win64\UnrealEditor-Cmd.exe")
2834

29-
"!EDITOR_EXE!" "%PROJECT_FILE%" -run=SentrySymbolUpload -target-platform=%TARGET_PLATFORM% -target-name=%TARGET_NAME% -target-type=%TARGET_TYPE% -target-configuration=%TARGET_CONFIGURATION% -unattended -nopause -nullrhi
35+
"!EDITOR_EXE!" "%PROJECT_FILE%" -run=SentrySymbolUpload -target-platform=%TARGET_PLATFORM% -target-type=%TARGET_TYPE% -target-configuration=%TARGET_CONFIGURATION% -unattended -nopause
36+
37+
endlocal
3038

31-
endlocal
39+
exit /B 0

plugin-dev/Scripts/upload-debug-symbols-win.bat

Lines changed: 0 additions & 183 deletions
This file was deleted.

0 commit comments

Comments
 (0)