Skip to content

Commit e8ce275

Browse files
unity-setup@v1.0.2 (#5)
- fix version override when no `version-file` is specified in inputs
1 parent eee7a67 commit e8ce275

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

dist/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31191,14 +31191,7 @@ async function ValidateInputs() {
3119131191
core.info(`versionFilePath:\n > "${versionFilePath}"`);
3119231192
const [unityVersion, changeset] = await getUnityVersionFromFile(versionFilePath);
3119331193
const versions = getUnityVersionsFromInput();
31194-
const pathInput = core.getInput('version-file');
31195-
const overrideVersion = pathInput && pathInput.length > 0 && versions.length > 0;
31196-
if (versions.length > 0) {
31197-
const version = versions.find(([v, c]) => v === unityVersion && c === changeset);
31198-
if (!version && !overrideVersion) {
31199-
versions.push([unityVersion, changeset]);
31200-
}
31201-
} else {
31194+
if (versions.length === 0) {
3120231195
versions.push([unityVersion, changeset]);
3120331196
}
3120431197
versions.sort(([a], [b]) => semver.compare(a, b, true));

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.

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unity-setup",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A GitHub action for setting up the Unity Game Engine for CI/CD workflows.",
55
"author": "RageAgainstThePixel",
66
"license": "MIT",

src/inputs.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ async function ValidateInputs() {
4646
core.info(`versionFilePath:\n > "${versionFilePath}"`);
4747
const [unityVersion, changeset] = await getUnityVersionFromFile(versionFilePath);
4848
const versions = getUnityVersionsFromInput();
49-
const pathInput = core.getInput('version-file');
50-
const overrideVersion = pathInput && pathInput.length > 0 && versions.length > 0;
51-
if (versions.length > 0) {
52-
const version = versions.find(([v, c]) => v === unityVersion && c === changeset);
53-
if (!version && !overrideVersion) {
54-
versions.push([unityVersion, changeset]);
55-
}
56-
} else {
49+
if (versions.length === 0) {
5750
versions.push([unityVersion, changeset]);
5851
}
5952
versions.sort(([a], [b]) => semver.compare(a, b, true));

0 commit comments

Comments
 (0)