Skip to content
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

Add support for butler #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add support for butler #13

wants to merge 1 commit into from

Conversation

idbrii
Copy link
Contributor

@idbrii idbrii commented Mar 31, 2021

Make it trivial to use makelove to push butler builds to itch.io.

Adds a new butler section with two parameters:

itchapp - the name of the app: username/projectname.
publish_love - whether to publish the .love file (since it's not a
target).

Remove butler from postbuild examples since we have a better way of
doing that.

Test

Created a test project on itch and pushed win32, win64, macos, lovejs,
love builds to it from Win10. Incremented version and pushed a new win32
build. Version numbers show as expected.

Play lovejs build in browser. Play from itch app.

Butler is not invoked when itchapp is not defined.

Make it trivial to use makelove to push butler builds to itch.io.

Adds a new butler section with two parameters:

itchapp - the name of the app: username/projectname.
publish_love - whether to publish the .love file (since it's not a
    target).

Remove butler from postbuild examples since we have a better way of
doing that.

Test
====

Created a test project on itch and pushed win32, win64, macos, lovejs,
love builds to it from Win10. Incremented version and pushed a new win32
build. Version numbers show as expected.

Play lovejs build in browser. Play from itch app.

Butler is not invoked when itchapp is not defined.
Copy link

@hollunder hollunder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a fantastic feature from my point of view as itch is my primary outlet.
I don't see anything wrong with the code but I'm also not experienced with Python :^]

I have not yet used butler so the obvious question that arises for me is how login is done. Maybe that could be documented in a sentence.

I am already looking forward to trying it (soon™).
Edit: Linux user here, I think you use Windows, so verifying this works may actually be valuable :]

@idbrii
Copy link
Contributor Author

idbrii commented Jun 2, 2021

@hollunder makelove's configuration is generally documented in makelove_full.toml so this commit includes documentation there which essentially points you to https://itch.io/docs/butler/. Logging in is the third step in their tutorial. It's done by magic link and a saved token, so makelove doesn't need to store or access any authentication information.

(Butler setup is super easy: install via itch app, run, open magic link, click button, done.)

Yeah, I'm using Windows so I look forward to hearing how well this works on Linux!

@pfirsich
Copy link
Owner

Why are the postbuild actions not sufficient here? I feel like having a dependency like that needs a good reason, because if butler or the a API (the command line interface and the token stuff) ever changes, makelove needs changes too. Any code also needs maintenance and I feel like by having it, a user doesn't even save much. I would say you probably need to read the butler docs anyway (for seting it up and auth) and you also need to add a line to your makelove.toml in the end.

@idbrii
Copy link
Contributor Author

idbrii commented Sep 4, 2021

Advantages over postbuild:

  • Two lines of configuration for each project. Single point of maintenance (makelove) instead of per game. Confidence posting updates to old games Just Works.
  • postbuild steps don't know which targets were built, so you can't upload a specific build without editing your config.
  • easier to get paths right. Passing strings correctly is easier when there's no shell in between. (Although PR needs fixing to handle spaces in path)
  • postbuild steps don't include full paths or variables for the game name, so each project needs specific setup:
    • current postbuild: "butler push {build_directory}/win32/SuperGame-win32.zip pfirsich/supergame:win32 --userversion {version}"
    • ideal per-target postbuild: "butler push {target_build_zip} {target_name}:{target_platform} --userversion {version}"

Users could write a postbuild step that handles the above and parses the makelove.toml, but that's a lot of extra work. makelove could expose per-target post build steps (and include a .love target for Linux support), but still has many points of maintenance.

Any code also needs maintenance and I feel like by having it, a user doesn't even save much.

My biggest argument is that if butler changes and one person pushes a fix to makelove, then it's fixed for every user instead of all users maintaining their own postbuild in each of their projects. Although, I recognize the downside of putting the maintenance burden on you instead of the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants