mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Remove version checking from image-tag
This commit is contained in:
parent
0c16aab353
commit
2c1b4030c8
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -27,7 +27,7 @@ describe('ImageTag', () => {
|
|||||||
expect(image.builderPlatform).toStrictEqual(testImageParameters.builderPlatform);
|
expect(image.builderPlatform).toStrictEqual(testImageParameters.builderPlatform);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.each(['2000.0.0f0', '2011.1.11f1'])('accepts %p version format', (version) => {
|
test.each(['2000.0.0f0', '2011.1.11f1', '6000.0.0f1'])('accepts %p version format', (version) => {
|
||||||
expect(
|
expect(
|
||||||
() =>
|
() =>
|
||||||
new ImageTag({
|
new ImageTag({
|
||||||
@ -37,11 +37,6 @@ describe('ImageTag', () => {
|
|||||||
).not.toThrow();
|
).not.toThrow();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.each(['some version', ''])('throws for incorrect version %p', (editorVersion) => {
|
|
||||||
const { targetPlatform } = testImageParameters;
|
|
||||||
expect(() => new ImageTag({ editorVersion, targetPlatform })).toThrow();
|
|
||||||
});
|
|
||||||
|
|
||||||
test.each(['nonExisting'])('throws for unsupported target %p', (targetPlatform) => {
|
test.each(['nonExisting'])('throws for unsupported target %p', (targetPlatform) => {
|
||||||
expect(() => new ImageTag({ targetPlatform })).toThrow();
|
expect(() => new ImageTag({ targetPlatform })).toThrow();
|
||||||
});
|
});
|
||||||
|
@ -20,10 +20,6 @@ class ImageTag {
|
|||||||
providerStrategy,
|
providerStrategy,
|
||||||
} = imageProperties;
|
} = imageProperties;
|
||||||
|
|
||||||
if (!ImageTag.versionPattern.test(editorVersion)) {
|
|
||||||
throw new Error(`Invalid version "${editorVersion}".`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Todo we might as well skip this class for customImage.
|
// Todo we might as well skip this class for customImage.
|
||||||
// Either
|
// Either
|
||||||
this.customImage = customImage;
|
this.customImage = customImage;
|
||||||
@ -41,10 +37,6 @@ class ImageTag {
|
|||||||
this.imageRollingVersion = Number(containerRegistryImageVersion); // Will automatically roll to the latest non-breaking version.
|
this.imageRollingVersion = Number(containerRegistryImageVersion); // Will automatically roll to the latest non-breaking version.
|
||||||
}
|
}
|
||||||
|
|
||||||
static get versionPattern(): RegExp {
|
|
||||||
return /^(20\d{2}\.\d\.\w{3,4}|3)$/;
|
|
||||||
}
|
|
||||||
|
|
||||||
static get targetPlatformSuffixes() {
|
static get targetPlatformSuffixes() {
|
||||||
return {
|
return {
|
||||||
generic: '',
|
generic: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user