Getting SVN revision number into a program automatically

后端 未结 11 1515
孤城傲影
孤城傲影 2020-12-02 21:07

I have a python project under SVN, and I\'m wanting to display the version number when it is run. Is there any way of doing this (such as automatically running a short scrip

11条回答
  •  情书的邮戳
    2020-12-02 21:54

    I do this by simply running a small script when building my project. The script just calls svn info in combination with sed to get out the bare revision data and injects that number into the revision.txt file.

    The Hudson build server makes it even easier as it sets the SVN revision number as an environment variable right before invoking your Build scripts.

提交回复
热议问题