feat: set activate command to always return exit code 0
This change will allow pipelines with shell that exit on error to run the activate script.pull/371/head
parent
ca9d445c3c
commit
c62f2498b6
|
|
@ -48,7 +48,7 @@ function runMain() {
|
||||||
try {
|
try {
|
||||||
model_1.Action.checkCompatibility();
|
model_1.Action.checkCompatibility();
|
||||||
model_1.Cache.verify();
|
model_1.Cache.verify();
|
||||||
const { dockerfile, workspace, actionFolder } = model_1.Action;
|
const { workspace, actionFolder } = model_1.Action;
|
||||||
const buildParameters = yield model_1.BuildParameters.create();
|
const buildParameters = yield model_1.BuildParameters.create();
|
||||||
const baseImage = new model_1.ImageTag(buildParameters);
|
const baseImage = new model_1.ImageTag(buildParameters);
|
||||||
if (buildParameters.cloudRunnerCluster &&
|
if (buildParameters.cloudRunnerCluster &&
|
||||||
|
|
@ -117,19 +117,6 @@ class Action {
|
||||||
static get actionFolder() {
|
static get actionFolder() {
|
||||||
return `${Action.rootFolder}/dist`;
|
return `${Action.rootFolder}/dist`;
|
||||||
}
|
}
|
||||||
static get dockerfile() {
|
|
||||||
const currentPlatform = process.platform;
|
|
||||||
switch (currentPlatform) {
|
|
||||||
case 'linux':
|
|
||||||
return `${Action.actionFolder}/platforms/ubuntu/Dockerfile`;
|
|
||||||
case 'win32':
|
|
||||||
return `${Action.actionFolder}/platforms/windows/Dockerfile`;
|
|
||||||
case 'darwin':
|
|
||||||
return 'unused'; //Mac doesn't use a container
|
|
||||||
default:
|
|
||||||
throw new Error(`No Dockerfile for currently unsupported platform: ${currentPlatform}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static get workspace() {
|
static get workspace() {
|
||||||
return process.env.GITHUB_WORKSPACE;
|
return process.env.GITHUB_WORKSPACE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -28,10 +28,14 @@ if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Activate license
|
# Activate license
|
||||||
ACTIVATION_OUTPUT=$(unity-editor \
|
# Set to always return true, otherwise the shell will exit on pipelines set to fail on error
|
||||||
-logFile /dev/stdout \
|
ACTIVATION_OUTPUT=UnityActivation.log
|
||||||
-quit \
|
|
||||||
-manualLicenseFile $FILE_PATH)
|
unity-editor \
|
||||||
|
-logFile "$ACTIVATION_OUTPUT" \
|
||||||
|
-quit \
|
||||||
|
-manualLicenseFile $FILE_PATH \
|
||||||
|
|| true
|
||||||
|
|
||||||
# Store the exit code from the verify command
|
# Store the exit code from the verify command
|
||||||
UNITY_EXIT_CODE=$?
|
UNITY_EXIT_CODE=$?
|
||||||
|
|
@ -43,7 +47,7 @@ if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
||||||
#
|
#
|
||||||
# "LICENSE SYSTEM [2020120 18:51:20] Next license update check is after 2019-11-25T18:23:38"
|
# "LICENSE SYSTEM [2020120 18:51:20] Next license update check is after 2019-11-25T18:23:38"
|
||||||
#
|
#
|
||||||
ACTIVATION_SUCCESSFUL=$(echo $ACTIVATION_OUTPUT | grep 'Next license update check is after' | wc -l)
|
ACTIVATION_SUCCESSFUL=$(cat $ACTIVATION_OUTPUT | grep 'Next license update check is after' | wc -l)
|
||||||
|
|
||||||
# Set exit code to 0 if activation was successful
|
# Set exit code to 0 if activation was successful
|
||||||
if [[ $ACTIVATION_SUCCESSFUL -eq 1 ]]; then
|
if [[ $ACTIVATION_SUCCESSFUL -eq 1 ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue