-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux versions fix #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
Does code calling |
lib/u3d/unity_runner.rb
Outdated
# Launches Unity with given arguments | ||
class Runner | ||
def run(installation, args, raw_logs: false) | ||
require 'fileutils' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected, and commit amended
|
lib/u3d/unity_version_number.rb
Outdated
@@ -43,7 +43,7 @@ def to_s | |||
class UnityVersionComparator | |||
include Comparable | |||
|
|||
RELEASE_LETTER_STRENGTH = { a: 1, b: 2, f: 3, p: 4 }.freeze | |||
RELEASE_LETTER_STRENGTH = { a: 1, b: 2, f: 3, p: 4, xa: 1, xb: 2, xf: 3, xp: 4 }.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a separate fix for the Linux fix, in particular with unit tests for the elements we have tests for. E.g. the UnityVersionComparator, etc.
Changes added not related to original fix.
First 3 commits merged. Can you pull rebase this PR so that we can treat the Linux part on its own? Thanks! |
Unity changed the listing for Linux versions above 5.5.0, and they weren't listed properly. This fixes this issue and also takes care of the special Linux version naming ('0.0.0xf0')
The Linux installer files often came with an 'x' in front of the release type letter. It is not meant to be permanent and u3d parses it as a regular version by getting rid of this x whenever necessary.
Changed the behaviour of the unity versions lister so linux versions are now parsed as regular ones. |
if capt && capt[1] && capt[2] | ||
versions[capt[2].gsub(/x/, '')] = capt[1] | ||
else | ||
UI.error("Could not retrieve a fitting file from #{url}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll accept the patch as is. For future improvements, I wonder if we should fail harder here (throw exceptions)
The LOG_RULES.md had some typos left, and some inconsistencies that needed tackling.
The installer.rb undergoes two modifications:
Small fix regarding Linux versions, versions above 5.5.0 should now be listed as well.