Idea

marcos avatar image
marcos suggested

Option to automatically deploy latest revision

When working on cloudscripts, we need to work, commit and then go to the Dashboard page, reload, select the new revision, and click on deploy. When working continuosly on cloudscripts this becomes very tedious and unproductive.

We need an option to always deploy latest revision. Also could help a webhook that we can use with github actions, or a command line utility that we can use from the vscode terminal for the same purpose.

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Comments

·
kamyker avatar image
kamyker commented

You can do it manually with https://titleId.playfabapi.com/Admin/UpdateCloudScript instead of github integration

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

marcos avatar image marcos commented ·

Thanks for sharing that. Indeed seems like a workaround. Problem with that is that requires a different pipeline, which requires making my own tooling.

Using Github, Playfab currently consolidates all script files into a single one, and manually deploys on demand.

Something like a command line tool that will login to playfab and then poke UpdateCloudScript endpoint, send a consolidated script file, and publish it sounds good, but I rather work on the game rather than that tool. Sounds tempting tho, I agree :)

1 Like 1 ·
kamyker avatar image kamyker marcos commented ·

Are u using Unity by any chance? It's included in their Editor Extension. In my workflow I use TypeScript -> run .bat file to build all files to single .js -> click "Upload" in Unity, done :)

2 Likes 2 ·
marcos avatar image marcos kamyker commented ·

Woot!

Indeed, Im using Unity. I m not using the editor extension, as after installing it seemed like a tank offering things I didnt needed, so I went along with the sdk only.

I will check that out again, and even maybe I can distill a separate tool that can be called from the .bat and do everything in one step.

Thank you again, great info.

1 Like 1 ·
marcos avatar image
marcos commented

I went ahead and put together a Windows PowerShell script that will merge, update and deploy the clouscript from command line.

Here it is:

https://gist.github.com/Novack/2f93edb5636efcb535085ad19df69511


That way, from the very same VSCode console we can have the latest scripts live without requiring extra steps from github or the Playfab dashboard. Of course having version control is still the recommended way to work, but version control and the Playfab GameCenter should not be involved when needing to having the changes up for testing.

All in all, I think is an acceptable workaround :)

Thanks to @kamyker for the useful hints.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kamyker avatar image
kamyker commented

Not sure when it was released out of preview but new PlayFab VS Code integration can upload revisions https://marketplace.visualstudio.com/items?itemName=PlayFab.playfab-explorer

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write a Comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.