itchio / butler

🎩 Command-line itch.io helper
MIT License
744 stars 55 forks source link

Update 15.18 breaks backward compatibility: new required argument --staging-dir for apply? #212

Open ghost opened 4 years ago

ghost commented 4 years ago

Since June 26, our automated build systems fail because the command line arguments of the apply command have changed? I didn't find anything about these changes in the official doc though, and it seems there is a required --staging-directory argument now? What is it for?

Posting this as an issue, maybe it wasn't intended to make this new parameter required?

fasterthanlime commented 4 years ago

Hi!

Indeed, there was a rewrite of the patcher at some point, then the apply command was switched to it on master, then I was recently forced to release a stable builder of butler to fix another bug, so, yeah, --staging-directory is mandatory now (and it's using new patching code). But the patch format should remain stable.

Patching as implemented in butler is optimized for delivering game updates, so it tries to:

That's the purpose of the staging directory When doing patching in-place, it first applies the changes to a staging directory, and at the last minute, it applies those to the target directory.

I would recommend reviewing if butler v15.18.0 is fit for your purposes, or revert to an earlier version - in either case, please note that we don't offer support for that particular usage of butler (outside of itch.io), except for me personally compulsively replying to polite github issues.

But yeah, ultimately, if I were you, I'd take a look at github.com/itchio/wharf, and use those APIs directly. Although, there too, there is no stability guarantee I can offer you, so, pin your dependencies.

Hope this helps!

fasterthanlime commented 4 years ago

(That said, when patching to another directory, it seems like --staging-dir should not be required, so, yeah, it might be a bug, and I would like to take a look at it, but don't have the time to do that right now)

ghost commented 4 years ago

Oh OK, thanks for the answers :)