Skip to content

Commit 2338dd0

Browse files
authored
feat: upgrade to images of version 1 (rolling tag) (#84)
1 parent 51c34e4 commit 2338dd0

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ fi
88
yarn lint-staged
99
yarn lint
1010
yarn test
11+
1112
yarn build
13+
git add dist

dist/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

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

src/model/image-tag.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('ImageTag', () => {
1616
it('returns the correct version', () => {
1717
const image = new ImageTag('2099.1.1111', '');
1818

19-
expect(image.toString()).toStrictEqual(`unityci/editor:2099.1.1111-linux-il2cpp-0`);
19+
expect(image.toString()).toStrictEqual(`unityci/editor:ubuntu-2099.1.1111-linux-il2cpp-1`);
2020
});
2121
});
2222
});

src/model/image-tag.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ class ImageTag {
103103
}
104104

105105
get tag() {
106-
return `${this.version}-${this.builderPlatform}`.replace(/-+$/, '');
106+
const dockerRepoVersion = 1;
107+
108+
const versionAndTargetPlatform = `${this.version}-${this.builderPlatform}`.replace(/-+$/, '');
109+
110+
return `ubuntu-${versionAndTargetPlatform}-${dockerRepoVersion}`;
107111
}
108112

109113
get image() {
@@ -113,12 +117,9 @@ class ImageTag {
113117
toString() {
114118
const { image, tag, customImage } = this;
115119

116-
if (customImage && customImage !== '') {
117-
return customImage;
118-
}
120+
if (customImage) return customImage;
119121

120-
const dockerRepoVersion = 0;
121-
return `${image}:${tag}-${dockerRepoVersion}`;
122+
return `${image}:${tag}`;
122123
}
123124
}
124125

0 commit comments

Comments
 (0)