简体   繁体   中英

How to use the SVN revision in Jenkins to set the c# assembly version

Using Jenkins, I'd like to set the version number of ac# assembly to something like 1.0.${SVN_REVISION}.${BUILD_NUMBER}. Unfortunately the Change Assembly Version plugin doesn't see the SVN revision number. Does anyone know a way to get this working?

I suspect that you have multiple SVN modules in use since I'm unable to reproduce your problem with Jenkins 1.651.1 and Change Assembly Version plugin 1.5.1.

The environment variable SVN_REVISION is replaced with multiple variables (SVN_REVISION_1, SVN_REVISION_2, ...) if you have more than one subversion module configured to your job. This would lead to undefined variable that cannot be expanded properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM