mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-15 04:26:48 -07:00
* add customImage attribute * add one more test for input passing && check for customImage == ''
This commit is contained in:
@@ -8,6 +8,7 @@ class ImageTag {
|
||||
name = 'unity3d',
|
||||
version = '2019.2.11f1',
|
||||
platform,
|
||||
customImage,
|
||||
} = imageProperties;
|
||||
|
||||
if (!ImageTag.versionPattern.test(version)) {
|
||||
@@ -24,7 +25,7 @@ class ImageTag {
|
||||
ImageTag.imageSuffixes.generic,
|
||||
);
|
||||
|
||||
Object.assign(this, { repository, name, version, platform, builderPlatform });
|
||||
Object.assign(this, { repository, name, version, platform, builderPlatform, customImage });
|
||||
}
|
||||
|
||||
static get versionPattern() {
|
||||
@@ -82,6 +83,10 @@ class ImageTag {
|
||||
toString() {
|
||||
const { image, tag } = this;
|
||||
|
||||
if (this.customImage && this.customImage !== '') {
|
||||
return this.customImage;
|
||||
}
|
||||
|
||||
return `${image}:${tag}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user