-
Notifications
You must be signed in to change notification settings - Fork 170
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
Generate default instance list on build #508
Conversation
I really like this idea, but I would prefer it be done in a cross-platform manner rather than requiring shell scripts whose dependencies aren't explicitly documented. |
Jerboa shouldn't be dependent on running a script to pull a list from a website it doesn't control. |
On second thought, this would violate reproducible builds by default. Maybe instead, this could be a Gradle task that is run that updates the file, and then that file is committed to the repo. It would then be done before performing a release. |
Sure, it can just make it a separate task instead. I could write it in a Kotlin script, but AFAIK it would mean that the |
A python script has the same problem as bash, unless gradle supports grabbing a python interpreter. There is another issue that suggests migrating the gradle build scripts to kotlin, I'd be in favor of that. |
Yeah that's true, I'll write it in Kotlin then. |
I've migrated the To run the task just do |
Where should I add the info on how to fetch the instances to the README? Maybe we should add a CONTRIBUTING file. |
You're right, this would make more sense in a Could you create that, and add just that info? I can rework it and add a few things about how to debug and such once that's done. |
Don't forget to add this info now that |
Obsoleted by #884 |
Added a script that will download a list of instances from https://the-federation.info/platform/73 using the GraphQL API, then write it to a file containing a constant.
Currently it'll get the top 10 instances with the most monthly users, but it can easily be changed to e.g. all instances with more than X monthly users instead. The script is called on every build but maybe it'd be better to only call it on release builds, not sure how to detect that though.
The script is written in Bash and thus will only work on Linux systems (it also requires
jq
andcurl
), so when building on other platforms a dummy instance list will be emitted.Also migrated all Gradle build scripts to Kotlin, so fixes #6.