-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
create-activation-file
job (#22)
* refactor: remove empty space * feat: add `create-activation-file` job * test: add activation file tests * fix: job description
- Loading branch information
1 parent
5bc316a
commit 0e19b68
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
description: > | ||
Simple drop-in job to create a Unity activation file. | ||
parameters: | ||
editor_version: | ||
description: | | ||
Pick the editor version for the GameCI image. | ||
Available options can be found at https://game.ci/docs/docker/versions. | ||
type: string | ||
default: "2021.3.7f1" | ||
|
||
docker: | ||
- image: 'unityci/editor:ubuntu-<<parameters.editor_version>>-base-1' | ||
|
||
resource_class: medium | ||
|
||
steps: | ||
- checkout | ||
- run: | ||
name: Create Unity activation file | ||
command: << include(scripts/linux/create-activation-file.sh) >> | ||
- store_artifacts: | ||
path: Unity.alf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/false | ||
# shellcheck shell=bash | ||
# shellcheck disable=SC2154 | ||
|
||
create_manual_activation_file() { | ||
unity-editor \ | ||
-batchmode \ | ||
-nographics \ | ||
-createManualActivationFile \ | ||
-quit \ | ||
-logfile /dev/null | ||
|
||
# Check if license file was created successfully. | ||
if ls Unity_v*.alf &> /dev/null; then return 0; else return 1; fi | ||
} | ||
|
||
if ! create_manual_activation_file; then | ||
printf '%s\n' "Failed to create Unity license file." | ||
printf '%s\n' "Please try again or open an issue." | ||
exit 1 | ||
fi | ||
|
||
mv Unity_v*.alf Unity.alf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters