itchio / butler

🎩 Command-line itch.io helper
MIT License
766 stars 54 forks source link

inconsistent Download Filenames for DMG and ZIP Files #263

Open stephane-archer opened 1 month ago

stephane-archer commented 1 month ago

I distribute my app in two shapes for macOS, a zip file and a dmg file

butler push ./FCP\ Library\ Cleaner-0.2.1.dmg fractale/fcp-library-cleaner:mac-dmg --userversion 0.2.1

when I download this file his name is FCP\ Library\ Cleaner-0.2.1.dmg as I wish but for the zip file:

butler push ./FCP\ Library\ Cleaner-0.2.1.zip fractale/fcp-library-cleaner:mac-zip --userversion 0.2.1

the filename is fcp-library-cleaner-mac-zip.zip which is not what I want.

Could you please ensure that the filename behavior is consistent across both file types? Alternatively, it would be helpful to have an option that allows specifying the desired download name for each file type. This would improve user experience and maintain consistency in naming conventions.

Thank you for your assistance!

leafo commented 1 month ago

Single file zip pushes are transparently extracted and treated like a directory push so that patches can be generated, the special behavior regarding single file pushes outlined here: https://itch.io/docs/butler/single-files.html#zipped-portable-builds

Filenames for directory pushes are generated based on the pattern {project-name}-{channel-name}. There is no way to change the default download naming convention at this time due to how we process process the patch to generate the download.

stephane-archer commented 1 month ago

@leafo thank you for your quick answer, would it be possible to add an option to force zip to be treated like the dmg file? The current behavior for zip does not include the version number in its file name, so users download fcp-library-cleaner-mac-zip.zip without any information about their version. a pattern like {project-name}-{channel-name}-{userversion} would be much better. Today uploading using a web browser offers more control over what the users download like file name, I wish Butler could do the same.

There is no way to change the default download naming convention at this time due to how we process the patch to generate the download.

Can we disable the patch system for zip using an option and send the whole file so we can choose the file name like it is for dmg? My projects are small and transfer speed is not an issue here.

leafo commented 1 month ago

Can we disable the patch system for zip using an option and send the whole file so we can choose the file name like it is for dmg? My projects are small and transfer speed is not an issue here.

There is no way to disable the patching system when using butler to upload files. You can opt out of patching if you upload files manually from the web interface.

stephane-archer commented 1 month ago

DMG or any other type of file has the behavior I need except for the zip, can't you make zip behave like a DMG by adding an option? Is there any way to publish files on itch using the command line? I use butler because it's a CLI app, not because of its pathing system. If none of these are possible, do you plan to change things?