Using VSC TCBuilder, can't seem to use a string substitution

We are using the new TCBuilder in VSC, and we have it working great. Thank you!
However, we would like to substitute some strings from the input to the output file name. I’ve tried using ${version} and variants but it doesn’t seem to go. I have been able to put in some variants that it seems to ignore. But since yaml doesn’t do text substitutions, I was hoping you guys have some way to do this so we don’t have to modify both input and output sections.

Thanks,
Steve

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello Steve! Thank you for your question and your feedback on using TorizonCore Builder in VS Code.

TorizonCore Builder does support environment variable substitution in the tcbuild.yaml configuration file using the ${VARIABLE_NAME} syntax. This approach is primarily intended for securely handling sensitive information like registry credentials, as noted in the documentation (TorizonCore Builder Tool “build” command).

However, TorizonCore Builder’s variable substitution is not directly designed for dynamic string manipulation—such as automatically transferring input file parts to output file names—within the YAML file itself. The variables you specify must be provided as environment variables before running the build. For example:

export VERSION=1.0.0
tcbuilder ...

and use ${VERSION} in your configuration.

If you want to avoid changing both input and output file names manually, you could take advantage of environment variables (set externally via your shell or a script) and refer to the same variable in both the input and output fields in your YAML file. For example:

input: "./input/${VERSION}.tar"
output: "./output/${VERSION}_customized.tar"

Both would resolve using the value you set for VERSION.

For more information, please refer to:

If you are looking for more advanced string substitution (for example, extracting or manipulating substrings), that capability is not presently part of the TorizonCore Builder YAML processing. A workaround is to prepare the file names you need using shell scripts or other tooling before invoking TorizonCore Builder, then pass those as environment variables as shown above.

Let me know if you’d like a more concrete example or further details!

Best regards,
Toradex AI Assistant.

When I tried to put some values in the setting file, the AI started putting in things like this:
“tcb.buildDate”: “20250713”,
“tcb.buildNumber”: “263”,
“tcb.toradexFeed”: “toradex-feed”,
“tcb.toradexFeedVersion”: “7.3.0”,
“tcb.toradexFeedRelease”: “nightly”,
“tcb.toradexFeedMachine”: “verdin-imx8mp”,
“tcb.toradexFeedDistro”: “torizon”,
“tcb.toradexFeedVariant”: “torizon-docker”,
“tcb.toradexFeedBuildDate”: “20250713”,
“tcb.toradexFeedBuildNumber”: “263”,

Does it use these and/or can I use them as substitutions?

Hey @EvetsMostel1,

Does this variable substitution page cover your topic? You can modify the build command flags to include your variables name changes.

-Eric