You could create another file with the version number in the java
property (key=value) format.
Then you can use the EnvInject plugin to inject the environment
variable (MY_NEW_VAR) into your job/build.
The advantage of this approach is that the variable can be visible
throughout the whole job/build.
You just enter the path/myVersion.txt in the Properties File field of
the plugin.

Alternatively just use DOS, eg: To place the first line of a file into
a variable, do this
Set /P MyVar=<aFilename>
The downside to this later approach is that you may have to repeat it
if you open several shells.

Reply via email to