-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dynamically set recommended appimage URL and config #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we turn this into a generic function for getting release info from GitHub, such that we could apply it to the wine-appimages repo and the installer repo? This way the function could supply code to both getting the recommended appimage for #5 and also for #46?
set_recommended_appimage_config() would then call this generic getter function and set the config to the latest release by running the succeeding parsing code.
utils.py
Outdated
releases_url = "https://api.github.com/repos/FaithLife-Community/wine-appimages/releases" # noqa: E501 | ||
json_data = json.loads(net_get(releases_url)) | ||
appimage_url = json_data[0].get('assets')[0].get('browser_download_url') | ||
logging.info(f"Recommended AppImage URL: {appimage_url}") | ||
config.RECOMMENDED_WINE64_APPIMAGE_FULL_URL = appimage_url | ||
config.RECOMMENDED_WINE64_APPIMAGE_FULL_FILENAME = os.path.basename(appimage_url) # noqa: E501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we turn this into a generic function for getting release info from GitHub, such that we could apply it to the wine-appimages repo and the installer repo? This way the function could supply code to both getting the recommended appimage for #5 and also for #46?
set_recommended_appimage_config()
would then call this generic getter function and set the config to the latest release by running the succeeding parsing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thoughts then are that we could work a second function that also sets the config with the latest installer release, too. We could run this function in the background or during start to check if there is a new release for either.
I just got the following error while working in the code:
Here's the log:
Read next comment for solution. |
Here's the issue:
Documentation:
Authenticated users can make 5,000 requests per hour. I doubt we want to set up storing a GitHub account but we could. I obviously hit this limit because of my iterating my code to test. Whatever we do, we probably need to account for this happening to our users. Here is my code modification to find this:
|
Partial fix for #5:
Bonus: