Skip to content

Commit 151389e

Browse files
committed
add debug log
1 parent 0017bd9 commit 151389e

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalPackagePublisher.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
using System.IO;
2929
using System.Linq;
3030
using UnityEditor;
31+
using UnityEngine;
3132

3233
namespace OneSignalSDK
3334
{
@@ -56,17 +57,12 @@ public static void ExportUnityPackage()
5657
var filePaths = _filePaths();
5758
Debug.Log($"File paths to export: {filePaths}");
5859

59-
if (filePaths.Length == 0)
60-
{
61-
Debug.LogError("ERROR: No file paths returned by _filePaths()!");
62-
EditorApplication.Exit(1);
63-
return;
64-
}
65-
6660
Debug.Log("Starting AssetDatabase.ExportPackage...");
6761

62+
var exportPath = "Assets/OneSignal";
63+
6864
AssetDatabase.ExportPackage(
69-
_filePaths(),
65+
exportPath,
7066
packageName,
7167
ExportPackageOptions.Recurse | ExportPackageOptions.IncludeDependencies
7268
);

composeRelease.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ executeUnityMethod() {
283283
local log_path="${log_dir}/${method_name}-${build_target}-$(date +%Y%m%d%H%M%S).txt"
284284

285285
echo "▶️ Running Unity method: ${method_name} (${build_target})"
286-
echo " Log file: ${log_path}"
287286

288287
# Clean up stale locks before running
289288
pkill -f Unity || true
@@ -301,15 +300,19 @@ executeUnityMethod() {
301300

302301
local method_result=$?
303302

303+
echo ""
304+
echo "==================== UNITY LOG ===================="
305+
cat "${log_path}" 2>/dev/null || echo "No log file found"
306+
echo "==================================================="
307+
echo ""
308+
304309
if [[ ${method_result} -ne 0 ]]; then
305-
echo "❌ Unity method ${method_name} failed with exit code ${method_result}"
306-
echo "----- Unity log tail (last 40 lines) -----"
307-
tail -n 40 "${log_path}" || echo "(no log file found)"
308-
echo "------------------------------------------"
310+
echo "❌ Unity exited with code ${method_result}"
309311
else
310-
echo "✅ Unity method ${method_name} completed successfully"
311-
echo " Full log: ${log_path}"
312+
echo "✅ Unity exited successfully"
312313
fi
314+
315+
return ${method_result}
313316
}
314317

315318
echo "Cleaning up Unity locks..."

0 commit comments

Comments
 (0)