-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fetch all URLs from a single URL, fix #46 #78
base: master
Are you sure you want to change the base?
Conversation
5fdaf2f
to
3d0f2b5
Compare
The overall concept is good. Besides permitting flexibility in the server configuration, this will be helpful when testing the updater. However, I think some more work will be needed to correctly deal with the asynchronous nature of the versions.json request: the results are not always available when you want them. For example, if the game update page is opened while we still don't have the news URL (this will be especially important with the feature I am working on for Windows to relaunch as administrator, in which the splash screen will be skipped on the second launch). |
We may postpone the news part, right? For the updater and game URLs I don't believe this PR adds more issue than there was before since those URLs were computed from fetched version numbers anyway. |
It doesn't introduce an issue for the updater URL, since updater update can only be initiated when the versions request has succeeded. It does create new problems for the game update. The game URL actually doesn't depend on the version number currently. |
Ah, yes… 😕 |
So I rebased, and race conditions should now be avoided. Here is an example of {
"news": {
"version": "rolling",
"mirrors": [ "https://unvanquished.net" ],
"parcels": {
"all-all": {
"path": "api/get_recent_posts",
"content": "raw",
"container": "json"
}
}
},
"game": {
"version": "0.54.1",
"mirrors": [ "https://cdn.unvanquished.net" ],
"parcels": {
"all-all": {
"path": "unvanquished_0.54.1.torrent",
"content": "mixed-files",
"container": "torrent"
}
}
},
"updater": {
"version": "0.2.0",
"mirrors": [ "https://github.com/Unvanquished/updater/releases/download/v0.2.0" ],
"parcels": {
"linux-amd64": {
"path": "UnvUpdaterLinux.zip",
"content": "single-file",
"container": "zip"
},
"windows-i686": {
"path": "UnvUpdaterWin.zip",
"content": "single-file",
"container": "zip"
},
"macos-amd64": {
"path": "UnvUpdaterOSX.zip",
"content": "single-directory",
"container": "zip"
}
}
}
} This new file is already generated by default on release (I added generation code for it in release scripts in 2021 when I opened this PR). Some command line changed, the The json file already supports multiple mirrors, but the updater code doesn't for now. In the future I want it to. |
ef4580b
to
14215fc
Compare
Only one URL is hardcoded, which is a json file telling everything else.
The format is meant to be able to update the paths after a release, and to improve the updater to support multiple mirrors in the future. See #46