flathub-infra / flatpak-external-data-checker

A tool for checking if the external data used in Flatpak manifests is still up to date
GNU General Public License v2.0
115 stars 34 forks source link

Auto updating generated sources for node apps #124

Open proletarius101 opened 3 years ago

proletarius101 commented 3 years ago

Since #74 gets supported, it will be even easier to support node apps in the same basis

gasinvein commented 3 years ago

I'm afraid it won't. We can't just randomly bump npm packages versions, they must be exactly what was specified in the lockfile.

proletarius101 commented 3 years ago

I guess you misunderstood. Like what we do for pip, I'm asking for generating the sources according to the lockfile, when the lockfile provided by the upstream updated.

gasinvein commented 3 years ago

We don't read any lockfiles (pip doesn't even have such) to update PyPI packages, we just look for new versions.

proletarius101 commented 3 years ago

Then why not do this as per the lockfile for node apps? To my understanding it doesn't bump anything. Just exactly follows the lockfile.

gasinvein commented 3 years ago

This is not exactly easy. We'll need to download sources on disk, extract them and run flatpak-builder-tools against them.

proletarius101 commented 3 years ago

So for anyone interested, here is a modified version of the auto source update workflow: https://github.com/flathub/org.standardnotes.standardnotes/blob/master/.github/workflows/auto-update.yml which uses this update script: https://github.com/flathub/org.standardnotes.standardnotes/blob/master/update.py

gasinvein commented 3 years ago

@proletarius101 You probably shouldn't update to the latest commit. Veloren, where you took the script from, is special in that regard as the upstream itself suggests using builds from master, which is probably not the case for StandardNotes. You should use tagged releases instead.

proletarius101 commented 3 years ago

@proletarius101 You probably shouldn't update to the latest commit. Veloren, where you took the script from, is special in that regard as the upstream itself suggests using builds from master, which is probably not the case for StandardNotes. You should use tagged releases instead.

It's suggested by you. But yes, the deps should also be aligned with the tagged version (StandardNotes itself is supposed to be updated by flathubbot instead, which only targets the tagged versions), which can be easily done in the script

gasinvein commented 3 years ago

I did not suggest neither to copy that script as is nor to update the app to the branch tip. Moreover, I pretty clearly said it's discouraged.

proletarius101 commented 3 years ago

Moreover, I pretty clearly said it's discouraged.

Yes but, what are the reasons? I can only think of it tracks the master branch

I did not suggest neither to copy that script as is

And it's not

gasinvein commented 3 years ago

@proletarius101 Yes, at the very least you should've adapted it to track latest tag instead of the branch tip, and don't use it together with f-e-d-c. To be clear: the script wasn't designed to be reusable, and I advise you against reusing it, unless you feel like rewriting a large part of it yourself to fit your needs.