set variables
There is way to set variable per library?
I want to set a variable with the same name in 2 different libraries, but i want the variable will be local to the library and don't effect others libraries. the .tset is an option but it will be per step inside the library no? i need it to work on 2 steps |
4 answers
There is way to set variable per library? It sounds like .tset might work for you if the structure of your project allows for making subsequent steps that need that variable as inlines. The .tset command takes effect for all commands in the step and for any Inline specified for the step. It will not permanently change the variable value for the environment (that would be a .set) or for the build environment (that would be a .bset). |
There is way to set variable per library? It sounds like .tset might work for you if the structure of your project allows for making subsequent steps that need that variable as inlines. The .tset command takes effect for all commands in the step and for any Inline specified for the step. It will not permanently change the variable value for the environment (that would be a .set) or for the build environment (that would be a .bset). if i do .set in the first step and in the second step i ask with condition if there is a value in the variable it will work? the value will be saved for the second step? |
if i do .set in the first step and in the second step i ask with condition if there is a value in the variable it will work? the value will be saved for the second step? The .set command changes the master record for an environment. Therefore, if you use .set to change an environment variable value in the first step, you will need to explicitly set that same environment on the second step that you would like to see the new value. Otherwise, your second step will pick up the variable value that was in effect on the environment when you started the build. The value you set with the .set will persist in the environment after the build has completed. |
.bset will do what you have described: Here is the summary of what the command do:
.tset: set variable for the current step only .bset set variable for all following steps in the current job only .set set variable in the master environment. Applies to future runs of the project only There is way to set variable per library? It sounds like .tset might work for you if the structure of your project allows for making subsequent steps that need that variable as inlines. The .tset command takes effect for all commands in the step and for any Inline specified for the step. It will not permanently change the variable value for the environment (that would be a .set) or for the build environment (that would be a .bset). if i do .set in the first step and in the second step i ask with condition if there is a value in the variable it will work? the value will be saved for the second step? |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.