Hi everyone,
is there a way to specify the app name and version in the info.yml file of the app instead of location in app_location.yml from tk_config ?
I tried to override it, but got a bug specifying the type to “path” (or path).
We work with custom versions of the apps (workfiles2, publish2) and don’t want to edit tk_config to specify the right version everytime we create a new version of our apps.
Hi @tristanlg
What descriptor are you using for your apps currently?
Where are your custom apps sourced from?
There is actually a PR right now that we are considering (but haven’t committed to yet), which allows the version on the descriptor to be set via an env var:
That is for use with the path descriptor though.
I’m not sure how setting it in the info.yml would help though, as you would have had to have found the app already by this point in order to read it?
Also for what purpose do you want to change the name, so that it shows up named differently in the Shotgun menus?
Our custom apps are modified Shotgun’s default apps (tk-multi-workfiles2, tk-multi-publish2 and so on) and they are stored on our local servers, and we manage to get their path using env var like you can see in the provided descriptor.
During my searches it appears that :
You’re right that setting it in the info.yml has no sense as the app is already found.
You’re also right for the name, we’ll keep Shotgun’s default names as it seems that tk-core uses hard coded names of the apps in some parts
So we “just” need to be able to manage the version with an env var with a type = path and the MR you’re linking to will do exactly what we need.
For now we’re keep Shotgun’s version number instead of our owns and that’s not what we want.
Any idea of when it will be merged ? We try to avoid internal tk-core modifications.
Ah Nice!
I don’t unfortunately have a time frame for the release of the change. With the Summer holiday season upon us, it may take longer than usual to get it out, and I still can’t actually guarantee that it will be released although it seems likely.
Unfortunately I don’t think this PR will solve your problem. The path descriptor does not support versioning the way you’re trying to use it and this PR is meant to solve a different issue. But I do think I have a work-around you could try.
As you’ve noticed already, the path value in the descriptor has its environment variables resolved. So you could concatenate both your environment variables together and place them in the path like this:
path: ${WORKFILES2_PATH}/${WORKFILES2_VERSION}
If you don’t specify a version parameter, the version will be called Undefined which makes it hard to track which version of an app you’re using.
The solution would be to also include the version parameter. Your descriptor would look like this
This is where this PR does help you. Currently, the above descriptor will work but the environment variable in the version parameter is not resolved. So you will see something like this in your app (my test was with the tk-multi-publish2 app instead of the tk-mutli-workfile2):
But once this PR is merged, you should see the correct version showing up in the app as well.