image tags updated

This commit is contained in:
BLaZeKiLL 2020-10-24 12:13:29 +05:30
parent dc54ae10a5
commit 9269fba307
3 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -36,8 +36,8 @@ class ImageTag {
return {
generic: '',
webgl: 'webgl',
mac: 'mac',
windows: 'windows',
mac: 'mac-mono',
windows: 'windows-mono',
android: 'android',
ios: 'ios',
facebook: 'facebook',
@ -47,7 +47,7 @@ class ImageTag {
static get targetPlatformToImageSuffixMap() {
const { generic, webgl, mac, windows, android, ios, facebook } = ImageTag.imageSuffixes;
// @see: https://docs.editor.com/ScriptReference/BuildTarget.html
// @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html
return {
[Platform.types.StandaloneOSX]: mac,
[Platform.types.StandaloneWindows]: windows,
@ -87,7 +87,7 @@ class ImageTag {
return this.customImage;
}
return `${image}:${tag}`;
return `${image}:${tag}-0`; // '0' here represents the docker repo version
}
}

View File

@ -49,7 +49,7 @@ describe('UnityImageVersion', () => {
it('returns the correct version', () => {
const image = new ImageTag({ version: '2099.1.1111', platform: some.platform });
expect(image.toString()).toStrictEqual(`${defaults.image}:2099.1.1111`);
expect(image.toString()).toStrictEqual(`${defaults.image}:2099.1.1111-0`);
});
it('returns customImage if given', () => {
const image = new ImageTag({
@ -64,13 +64,13 @@ describe('UnityImageVersion', () => {
it('returns the specific build platform', () => {
const image = new ImageTag({ version: '2019.2.11f1', platform: 'WebGL' });
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1-webgl`);
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1-webgl-0`);
});
it('returns no specific build platform for generic targetPlatforms', () => {
const image = new ImageTag({ platform: 'NoTarget' });
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1`);
expect(image.toString()).toStrictEqual(`${defaults.image}:2019.2.11f1-0`);
});
});
});