Skip to content

Commit

Permalink
Run license activation in an empty directory (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
webbertakken authored Aug 30, 2021
1 parent 7d9f968 commit 3ebdb0e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dist/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env bash

#
# Create directory for license activation
#

ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license"
mkdir -p "$ACTIVATE_LICENSE_PATH"

#
# Run steps
#
Expand All @@ -8,6 +15,12 @@ source /steps/activate.sh
source /steps/build.sh
source /steps/return_license.sh

#
# Remove license activation directory
#

rm -r "$ACTIVATE_LICENSE_PATH"

#
# Instructions for debugging
#
Expand Down
7 changes: 7 additions & 0 deletions dist/steps/activate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# Run in ACTIVATE_LICENSE_PATH directory
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
pushd "$ACTIVATE_LICENSE_PATH"

if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
#
# PERSONAL LICENSE MODE
Expand Down Expand Up @@ -98,3 +102,6 @@ else
echo "Exit code was: $UNITY_EXIT_CODE"
exit $UNITY_EXIT_CODE
fi

# Return to previous working directory
popd
7 changes: 7 additions & 0 deletions dist/steps/return_license.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# Run in ACTIVATE_LICENSE_PATH directory
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
pushd "$ACTIVATE_LICENSE_PATH"

if [[ -n "$UNITY_SERIAL" ]]; then
#
# PROFESSIONAL (SERIAL) LICENSE MODE
Expand All @@ -11,3 +15,6 @@ if [[ -n "$UNITY_SERIAL" ]]; then
-quit \
-returnlicense
fi

# Return to previous working directory
popd

0 comments on commit 3ebdb0e

Please sign in to comment.