Closed mac-cain13 closed 1 year ago
Indeed, I think we should make this a hard error. generate_appcast has some logic for moving aside old updates and not including them in the appcast so I don't think there's a good way to handle just ignoring duplicate archives like this. Your "stable" release can be in a different directory. I think even a subdirectory of this appcast folder would work since subdirectories should be ignored by the tool.
A hard error indicating that 2 exact same releases are not being supported would have really helped a lot indeed. Having the "stable" release in a different directory is no issue at all.
This main problem really is that it was very unclear what caused the issue and how to resolve it. Not so much that this isn't supported.
Summary
Having 2 exactly the same zips in the app cast directory gives errors about files/archives/permissions not being correct. It's pretty unclear what's wrong when this happens, resulting in a very confusing and hard to troubleshoot experience.
Context
In our app cast folder we recently added
App.zip
which is a copy of the newest version of the app,App.zip
is there as a convenience to have a stable URL to the latest version. While releasing a new version we putApp-0.2.0.zip
in the folder and copied it toApp.zip
. We expected to be able to just run generate app cast as usual, but got errors.Reproduction path
App-0.2.0.zip
App.zip
in the same foldergenerate_appcast
Expected:
Actual: An error that varies every run, caused probably by 2 tasks extracting parallel into the same directory. Errors often are about files not being there, already being there or having incorrect permissions. Also an error about being unable to extract the archive is logged.
Possible Fix
A clear error would be great by detecting there are two files that resolve to the same hash that is used for the temporary folder.
Version
Sparkler 2.4.2