How to get svn version number from checkout for use in dsl

前端 未结 7 1868
南方客
南方客 2021-01-05 03:06

I created a pipeline job and would like to get the svn version number to enable further downstream processing in a call to a shell script. I am using a pipeline script simi

7条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 03:40

    I ended up invoking a shell to get the svn revision number as follows

    def svnVersionNumber = sh(
        script: "svn info --show-item last-changed-revision $url",
        returnStdout: true
    )
    

    This was the only way I could get it to work correctly.

提交回复
热议问题