Skip to content
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

Auto updating generated sources for node apps #124

Open
proletarius101 opened this issue Feb 15, 2021 · 11 comments
Open

Auto updating generated sources for node apps #124

proletarius101 opened this issue Feb 15, 2021 · 11 comments
Labels
enhancement New feature or request needs design

Comments

@proletarius101
Copy link

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

@gasinvein
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

gasinvein commented Feb 15, 2021

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

@proletarius101
Copy link
Author

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
Copy link
Collaborator

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

@gasinvein gasinvein added the enhancement New feature or request label Feb 15, 2021
@proletarius101
Copy link
Author

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
Copy link
Collaborator

@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
Copy link
Author

@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
Copy link
Collaborator

gasinvein commented Mar 13, 2021

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
Copy link
Author

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
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs design
Projects
None yet
Development

No branches or pull requests

2 participants