Skip to content

Commit 3ebdb0e

Browse files
authoredAug 30, 2021
Run license activation in an empty directory (#285)
1 parent 7d9f968 commit 3ebdb0e

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
 

‎dist/entrypoint.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
#
4+
# Create directory for license activation
5+
#
6+
7+
ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license"
8+
mkdir -p "$ACTIVATE_LICENSE_PATH"
9+
310
#
411
# Run steps
512
#
@@ -8,6 +15,12 @@ source /steps/activate.sh
815
source /steps/build.sh
916
source /steps/return_license.sh
1017

18+
#
19+
# Remove license activation directory
20+
#
21+
22+
rm -r "$ACTIVATE_LICENSE_PATH"
23+
1124
#
1225
# Instructions for debugging
1326
#

‎dist/steps/activate.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
22

3+
# Run in ACTIVATE_LICENSE_PATH directory
4+
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
5+
pushd "$ACTIVATE_LICENSE_PATH"
6+
37
if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
48
#
59
# PERSONAL LICENSE MODE
@@ -98,3 +102,6 @@ else
98102
echo "Exit code was: $UNITY_EXIT_CODE"
99103
exit $UNITY_EXIT_CODE
100104
fi
105+
106+
# Return to previous working directory
107+
popd

‎dist/steps/return_license.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
22

3+
# Run in ACTIVATE_LICENSE_PATH directory
4+
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
5+
pushd "$ACTIVATE_LICENSE_PATH"
6+
37
if [[ -n "$UNITY_SERIAL" ]]; then
48
#
59
# PROFESSIONAL (SERIAL) LICENSE MODE
@@ -11,3 +15,6 @@ if [[ -n "$UNITY_SERIAL" ]]; then
1115
-quit \
1216
-returnlicense
1317
fi
18+
19+
# Return to previous working directory
20+
popd

0 commit comments

Comments
 (0)