I am a beginner working on INF files.
My .vcxproj file is having a property that uses 1.0.14.0 to use it in driverVer . My INF driverVer as follows DriverVer=04/10/2024,10.0.14.0
I would like to use build number in my INF file ,something like 1.0.14.$(build number).
How can I use azure build number to stamp my INF file ?
I tried using environment variable . But , the driverVer doesn’t pick the build number .
2
Answers
Based on your post’s tags, I’ll assume you’re build agent is Windows based.
You can achieve the desired result by using a PowerShell Script Task just after your Get Sources step in your pipeline.
You could use this script:
You can use the replace token task to replace the DriverVer with the build number in your azure DevOps pipeline.
My test Steps:
#{Build.BuildNumber}#
pattern in the driverVer.inf in the repo:$(Build.BuildNumber)
only contains a single version number instead of the default Date + version number. Then use the replace token task to replace the#{Build.BuildNumber}#
to the actual build number in the inf file.