Skip to content

Commit

Permalink
unity-setup@v1.0.9 (#19)
Browse files Browse the repository at this point in the history
- fix version matching to only match against release versions only, not alpha/beta channels unless specifically requested
  • Loading branch information
StephenHodgson authored Nov 11, 2024
1 parent 17a940f commit d53ab4f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 6 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34834,7 +34834,12 @@ async function getLatestRelease(version, isSilicon) {
for (const release of validReleases) {
const originalRelease = releases.find(r => r.includes(release.version));
const match = originalRelease.match(/(?<version>\d+\.\d+\.\d+[fab]?\d*)\s*(?:\((?<arch>Apple silicon|Intel)\))?/);
if (match && match.groups && match.groups.version) {
if (!(match && match.groups && match.groups.version)) {
continue;
}
if ((version.includes('a') && match.groups.version.includes('a')) ||
(version.includes('b') && match.groups.version.includes('b')) ||
match.groups.version.includes('f')) {
core.info(`Found Unity ${match.groups.version}`);
return [match.groups.version, undefined];
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unity-setup",
"version": "1.0.8",
"version": "1.0.9",
"description": "A GitHub action for setting up the Unity Game Engine for CI/CD workflows.",
"author": "RageAgainstThePixel",
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion src/unity-hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ async function getLatestRelease(version: string, isSilicon: boolean): Promise<[s
for (const release of validReleases) {
const originalRelease = releases.find(r => r.includes(release.version));
const match = originalRelease.match(/(?<version>\d+\.\d+\.\d+[fab]?\d*)\s*(?:\((?<arch>Apple silicon|Intel)\))?/);
if (match && match.groups && match.groups.version) {
if (!(match && match.groups && match.groups.version)) { continue; }
if ((version.includes('a') && match.groups.version.includes('a')) ||
(version.includes('b') && match.groups.version.includes('b')) ||
match.groups.version.includes('f')) {
core.info(`Found Unity ${match.groups.version}`);
return [match.groups.version, undefined];
}
Expand Down

0 comments on commit d53ab4f

Please sign in to comment.