Additional Windows Image Updates (#589)

* Update workflows, bump image version for docker

* Fix Unity pathing and cleanup scripts

* Fix Unity pathing

* Fix activation scripts
This commit is contained in:
Andrew Kahr
2023-10-30 23:55:39 -07:00
committed by GitHub
parent 4c4611c021
commit 7afabe74da
16 changed files with 93 additions and 66 deletions

View File

@@ -30,7 +30,11 @@ describe('ImageTag', () => {
test.each(['2000.0.0f0', '2011.1.11f1'])('accepts %p version format', (version) => {
expect(
() => new ImageTag({ editorVersion: version, targetPlatform: testImageParameters.targetPlatform }),
() =>
new ImageTag({
editorVersion: version,
targetPlatform: testImageParameters.targetPlatform,
}),
).not.toThrow();
});
@@ -46,13 +50,16 @@ describe('ImageTag', () => {
describe('toString', () => {
it('returns the correct version', () => {
const image = new ImageTag({ editorVersion: '2099.1.1111', targetPlatform: testImageParameters.targetPlatform });
const image = new ImageTag({
editorVersion: '2099.1.1111',
targetPlatform: testImageParameters.targetPlatform,
});
switch (process.platform) {
case 'win32':
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2099.1.1111-2`);
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2099.1.1111-3`);
break;
case 'linux':
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-2`);
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-3`);
break;
}
});
@@ -67,27 +74,33 @@ describe('ImageTag', () => {
});
it('returns the specific build platform', () => {
const image = new ImageTag({ editorVersion: '2019.2.11f1', targetPlatform: 'WebGL' });
const image = new ImageTag({
editorVersion: '2019.2.11f1',
targetPlatform: 'WebGL',
});
switch (process.platform) {
case 'win32':
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-webgl-2`);
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-webgl-3`);
break;
case 'linux':
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-2`);
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-3`);
break;
}
});
it('returns no specific build platform for generic targetPlatforms', () => {
const image = new ImageTag({ editorVersion: '2019.2.11f1', targetPlatform: 'NoTarget' });
const image = new ImageTag({
editorVersion: '2019.2.11f1',
targetPlatform: 'NoTarget',
});
switch (process.platform) {
case 'win32':
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-2`);
expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-3`);
break;
case 'linux':
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-2`);
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-3`);
break;
}
});