PeterMosmans / ansible-role-customize-gnome

Ansible role that customizes the GNOME desktop. It installs fonts and GNOME extensions from packages or zip files, copies files like desktop backgrounds and GNOME shell tweaks to a host, and modifies user settings.
GNU General Public License v3.0
74 stars 20 forks source link

fix: Handle unreleased GNOME Shell versions #20

Closed grdryn closed 1 year ago

grdryn commented 2 years ago

If the version of GNOME Shell isn't released yet, it seems that gnome-shell --version will return a value that's unexpected here in this role.

For example, in Fedora 37 Beta, I get the following:

$ gnome-shell --version
GNOME Shell 43.rc

Before this change, this would be parsed to 43.. The trailing . appears to be problematic when we use the version variable as a query param value in a request to extensions.gnome.org here:

https://github.com/PeterMosmans/ansible-role-customize-gnome/blob/0a395f24cddb33cd247153b51c5e8e7df718c7a4/tasks/get_extension_info.yml#L4

I don't know if there are any drawbacks to my approach here—I'm submitting it optimistically. :)

PeterMosmans commented 2 years ago

Thanks for the PR - please allow me some time to put in some tests, to see whether this regexp catches all exceptions

PeterMosmans commented 2 years ago

Hi @grdryn thanks again for you PR / bugreport. If you don't mind I implemented this slightly different, see the latest build. Please let me know if this works for you, then I'll release this version

grdryn commented 1 year ago

@PeterMosmans Since GNOME 43 is now released, I don't have the RC version installed any longer to try this with, but I played around with your change locally in a shell, and it seems good to me. Thanks! :100: