Is there a way to use sonar-runner to dynamically update the project version for every build without having to manually update the sonar-project.properties file each time? (note: this is for a non-mavenized .NET MVC app)
Was trying to parameterize the properties file having it reference an environment var set automatically
Added in sonar-runner.bat
for /f "delims=" %%i in ('hg identify -n') do set HG_LOCAL_REV=%%i
Modified sonar-project.properites
sonar.projectVersion=%HG_LOCAL_REV% #don't want to have to manually update this
Would be great if we could just pass the projectVersion as a parameter for sonar-runner.bat
You can remove "sonar.projectVersion" altogether from sonar-project.properties, and pass the value as a command line argument instead, when launching the sonar-runner:
sonar-runner -Dsonar.projectVersion="something"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With