Here's how I'm maintaining GNOME 44-and-below support for my extension

I’ve got a relatively new GNOME extension and some of my users are using distros that still ship with older GNOME versions (I was surprised when I ordered an Ubuntu laptop from Lenovo last month and it came with GNOME 42.9… needless to say I didn’t keep that around).

So I needed to figure out a way to maintain a 44-and-below build alongside 45+ that will stay up-to-date with all my latest updates since it’s still changing rapidly. My first get-anything-working-now approach was to just maintain a branch, and thus a separate “Release” and tag set in GitHub. This required that every time I made a significant update to my main branch, I had to check out my gnome-44-max branch, merge from main, the run builds and upload them. It’s worth noting that my extension wasn’t particularly affected by the 45 update, so the main diffs in the branch were updating imports and adding exports.

Today I brainstormed how I can put my gnome-44-max stuff onto my main branch and unify my package and setup process. Here’s what I did:

  • Created a patch representing all the changes from my gnome-44-max branch. This was as simple as “git diff main > gnome-44-max.patch”
  • Copied the patch over to the root directory of my main branch
  • Updated my package script to:
    1. Create a new directory for just gnome-44 (in .gitignore so it won’t show in diffs)
    2. Copy the extension source to the new directory
    3. Apply the patch to the new directory
    4. Build and package from the new path
    5. Put a “-44-max” in the resulting binary name

Then I just needed to update my end-user setup script to check the GNOME version and put the “-44-max” in the binary download URL if needed. From there the extraction and setup process were the same.

The resulting changes were pretty minimal, aside from the size of the patch file itself which took no work. I don’t know what to expect as far as how often I’ll have to re-generate the patch file.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.