I’m currently looking to create an app which will run in tk-shell to manage uploading new versions of our sgtk config to shotgun (we want to use distributed configs). I know that in the centralised configs it creates a tank command that I could then use to launch the command (e.g. tank my_release_command). How would I go about doing this from a dev config locally?
I have the config in a git repo that I’ve pulled down and ideally I’d like to cd into the directory and run something like tank release. This would bootstrap that config into the site.yml env and run my release command. At the moment I’ve done it with a script that bootstraps tk-shell engine (similar to the example on the Distributed Config and Render Farm Setup). And then I can run my command from there. This works but it’s not very neat because then when I write another command I have to write another bootstrap to be able to run it. The tank command is handy as it will expose all the commands available. I could copy the code from the tank_cmd.py to have the logic for finding all the commands available on the current environment. I’ve also noticed that the tank_cmd.py takes a config path so maybe I could bootstap with a script and then pass the bootstrapped config path (from appdata) to the tank_cmd.py
It would also be useful to be able to run the things like app updates on a local dev environment so we could pull latest updated app versions and then commit them into the git repo.
Just wondering if there’s a nicer way to do it? Or do stop me if I’m way off the mark here…