-
Notifications
You must be signed in to change notification settings - Fork 90
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
Use /etc/os-release for SUSE detection (Adopted) #505
Conversation
Moves the windows test into it's own block since it's not part of the set of debian tests. Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
The /etc/SuSE-release file was deprecated in older SUSE versions and as of openSUSE/SLES 15.X is no longer present on these systems. This changes the detection methods to use /etc/os-release which should be present on new as well as older systems. Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
Older versions of SUSE won't have the /etc/os-release file so fallback to the /etc/SuSE-release file in those cases. Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
…rain into cw/update-suse-detection
Code Climate has analyzed commit 38feb25 and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
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.
Our platform detection code makes me sad, but lets get this in =)
# https://rubular.com/r/xegcPXKEXJrJl5 | ||
version = suse[/VERSION *= *("?)([\d\.]{2,})\1$/, 2] if version == "" | ||
# https://rubular.com/r/b5PN3hZDxa5amV | ||
version = suse[/VERSION\s?=\s?"?([\d\.]{2,})"?/, 1] if version == "" |
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.
Why did this go backwards?
This is an adoption of #476, for rebasing. Following is the original PR description.
Description
The file
/etc/SuSE-release
was deprecated in older SUSE versions and as of SUSE/SLES 15.X is no longer present. This switches the detection to use the values in/etc/os-release
.Related Issue
Fixes #377
Types of changes
Checklist: