Rewrote license activation to use a lock to prevent race-conditions.

This commit is contained in:
2025-12-22 00:42:23 -08:00
parent 71b6b94a3a
commit e427bfd6b9
7 changed files with 98 additions and 20 deletions

View File

@@ -1,5 +1,17 @@
#!/bin/bash
SERIAL=$1; EMAIL=$2; PASSWORD=$3; COMMAND=$4; UNITY_BUILDER=$5
# Accept either positional arguments or environment variables
SERIAL=${1:-$SERIAL}
EMAIL=${2:-$EMAIL}
PASSWORD=${3:-$PASSWORD}
COMMAND=${4:-$COMMAND}
UNITY_BUILDER=${5:-$UNITY_BUILDER}
# Best-effort cleanup for any Docker lock created by the composite action.
if [[ -n "$LOCK_NAME" ]]; then
echo "Removing Docker lock '$LOCK_NAME'..."
docker rmi "$LOCK_NAME" >/dev/null 2>&1 || true
fi
DEFAULT_ARGS="-quit -logFile -"
rm -rf $HOME/.config/unity3d
@@ -29,7 +41,8 @@ RESULT=$?
echo "Unity command exited with code: $RESULT"
echo "::endgroup::"
echo "exitCode=$RESULT" >> "$GITHUB_OUTPUT"
# Uncomment if movingback to a docker action.
#echo "exitCode=$RESULT" >> "$GITHUB_OUTPUT"
if [[ "$CATCH_ERRORS" != "true" ]]; then
exit $RESULT