Closed giacgbj closed 7 years ago
Do you mean that instead of publishing of all files you just want to create the updates.json with relative links inside?
Yes I do: I mean the same "updates.json" is produced now, using the absolute urls that are created now, but in a local directory (this would be the new parameter), leaving out the publishing phase.
It's not possible to get absolute url to some asset without real publishing because the file url is returned by transport only after real uploading. So the only way for this situation is to get relative links.
But it's possible to extend existed transport and override uploadFile method which will only return a link.
Would it be too difficult to refactor the code in order to create a new "transport" method which could contain at minimum the following configurations?
{
"transport": {
"module": "local",
"localDir": "dist",
"remoteUrl": "http://example.com/updates",
}
}
It would generate locally in "dist" directory the release directories with the artifacts and the file "updates.json" which should be something like:
{
"darwin-x64-prod": {
"update": "https://example.com/updates/darwin-x64-prod-v0.5.0/release.json",
"install": "https://example.com/updates/darwin-x64-prod-v0.5.0/App-0.5.0.dmg",
"version": "0.5.0"
}
Directory tree:
It's not difficult, but I don't know when I'll have time for it.
Would be possible to add a parameter to create "updates.json" locally without the need to publish it somewhere else?