Skip to content

Commit 471bf0b

Browse files
committed
Merge branch 'BLaZeKiLL-fix/unity-alias' into main
2 parents 17c2899 + 6c2fbff commit 471bf0b

File tree

6 files changed

+48
-51
lines changed

6 files changed

+48
-51
lines changed

action/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

action/steps/activate.sh

100644100755
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
2424
fi
2525

2626
# Activate license
27-
ACTIVATION_OUTPUT=$(xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
28-
/opt/Unity/Editor/Unity \
27+
ACTIVATION_OUTPUT=$(unity-editor \
2928
-batchmode \
3029
-nographics \
3130
-logFile /dev/stdout \
@@ -63,15 +62,14 @@ elif [[ -n "$UNITY_SERIAL" && -n "$UNITY_EMAIL" && -n "$UNITY_PASSWORD" ]]; then
6362
echo "Requesting activation (professional license)"
6463

6564
# Activate license
66-
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
67-
/opt/Unity/Editor/Unity \
68-
-batchmode \
69-
-nographics \
70-
-logFile /dev/stdout \
71-
-quit \
72-
-serial "$UNITY_SERIAL" \
73-
-username "$UNITY_EMAIL" \
74-
-password "$UNITY_PASSWORD"
65+
unity-editor \
66+
-batchmode \
67+
-nographics \
68+
-logFile /dev/stdout \
69+
-quit \
70+
-serial "$UNITY_SERIAL" \
71+
-username "$UNITY_EMAIL" \
72+
-password "$UNITY_PASSWORD"
7573

7674
# Store the exit code from the verify command
7775
UNITY_EXIT_CODE=$?

action/steps/build.sh

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,25 +108,24 @@ echo "# Building platform #"
108108
echo "###########################"
109109
echo ""
110110

111-
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
112-
/opt/Unity/Editor/Unity \
113-
-batchmode \
114-
-nographics \
115-
-logfile /dev/stdout \
116-
-quit \
117-
-customBuildName "$BUILD_NAME" \
118-
-projectPath "$UNITY_PROJECT_PATH" \
119-
-buildTarget "$BUILD_TARGET" \
120-
-customBuildTarget "$BUILD_TARGET" \
121-
-customBuildPath "$CUSTOM_BUILD_PATH" \
122-
-executeMethod "$BUILD_METHOD" \
123-
-buildVersion "$VERSION" \
124-
-androidVersionCode "$ANDROID_VERSION_CODE" \
125-
-androidKeystoreName "$ANDROID_KEYSTORE_NAME" \
126-
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
127-
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
128-
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
129-
$CUSTOM_PARAMETERS
111+
unity-editor \
112+
-batchmode \
113+
-nographics \
114+
-logfile /dev/stdout \
115+
-quit \
116+
-customBuildName "$BUILD_NAME" \
117+
-projectPath "$UNITY_PROJECT_PATH" \
118+
-buildTarget "$BUILD_TARGET" \
119+
-customBuildTarget "$BUILD_TARGET" \
120+
-customBuildPath "$CUSTOM_BUILD_PATH" \
121+
-executeMethod "$BUILD_METHOD" \
122+
-buildVersion "$VERSION" \
123+
-androidVersionCode "$ANDROID_VERSION_CODE" \
124+
-androidKeystoreName "$ANDROID_KEYSTORE_NAME" \
125+
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
126+
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
127+
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
128+
$CUSTOM_PARAMETERS
130129

131130
# Catch exit code
132131
BUILD_EXIT_CODE=$?

action/steps/return_license.sh

100644100755
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ if [[ -n "$UNITY_SERIAL" ]]; then
66
#
77
# This will return the license that is currently in use.
88
#
9-
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
10-
/opt/Unity/Editor/Unity \
11-
-batchmode \
12-
-nographics \
13-
-logFile /dev/stdout \
14-
-quit \
15-
-returnlicense
9+
unity-editor \
10+
-batchmode \
11+
-nographics \
12+
-logFile /dev/stdout \
13+
-quit \
14+
-returnlicense
1615
fi

src/model/image-tag.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import Platform from './platform';
44
class ImageTag {
55
constructor(imageProperties) {
66
const {
7-
repository = 'gableroux',
8-
name = 'unity3d',
7+
repository = 'unityci',
8+
name = 'editor',
99
version = '2019.2.11f1',
1010
platform,
1111
customImage,
@@ -36,23 +36,24 @@ class ImageTag {
3636
return {
3737
generic: '',
3838
webgl: 'webgl',
39-
mac: 'mac',
40-
windows: 'windows',
39+
mac: 'mac-mono',
40+
windows: 'windows-mono',
41+
linux: 'base',
4142
android: 'android',
4243
ios: 'ios',
4344
facebook: 'facebook',
4445
};
4546
}
4647

4748
static get targetPlatformToImageSuffixMap() {
48-
const { generic, webgl, mac, windows, android, ios, facebook } = ImageTag.imageSuffixes;
49+
const { generic, webgl, mac, windows, linux, android, ios, facebook } = ImageTag.imageSuffixes;
4950

5051
// @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html
5152
return {
5253
[Platform.types.StandaloneOSX]: mac,
5354
[Platform.types.StandaloneWindows]: windows,
5455
[Platform.types.StandaloneWindows64]: windows,
55-
[Platform.types.StandaloneLinux64]: windows,
56+
[Platform.types.StandaloneLinux64]: linux,
5657
[Platform.types.iOS]: ios,
5758
[Platform.types.Android]: android,
5859
[Platform.types.WebGL]: webgl,
@@ -87,7 +88,7 @@ class ImageTag {
8788
return this.customImage;
8889
}
8990

90-
return `${image}:${tag}`;
91+
return `${image}:${tag}-0`; // '0' here represents the docker repo version
9192
}
9293
}
9394

src/model/image-tag.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ describe('UnityImageVersion', () => {
1010
};
1111

1212
const defaults = {
13-
repository: 'gableroux',
14-
name: 'unity3d',
15-
image: 'gableroux/unity3d',
13+
repository: 'unityci',
14+
name: 'editor',
15+
image: 'unityci/editor',
1616
};
1717

1818
describe('constructor', () => {
@@ -49,7 +49,7 @@ describe('UnityImageVersion', () => {
4949
it('returns the correct version', () => {
5050
const image = new ImageTag({ version: '2099.1.1111', platform: some.platform });
5151

52-
expect(image.toString()).toStrictEqual(`${defaults.image}:2099.1.1111`);
52+
expect(image.toString()).toStrictEqual(`${defaults.image}:2099.1.1111-0`);
5353
});
5454
it('returns customImage if given', () => {
5555
const image = new ImageTag({
@@ -64,13 +64,13 @@ describe('UnityImageVersion', () => {
6464
it('returns the specific build platform', () => {
6565
const image = new ImageTag({ version: '2019.2.11f1', platform: 'WebGL' });
6666

67-
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1-webgl`);
67+
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1-webgl-0`);
6868
});
6969

7070
it('returns no specific build platform for generic targetPlatforms', () => {
7171
const image = new ImageTag({ platform: 'NoTarget' });
7272

73-
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1`);
73+
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1-0`);
7474
});
7575
});
7676
});

0 commit comments

Comments
 (0)