Getting SVN revision number into a program automatically

后端 未结 11 1500
孤城傲影
孤城傲影 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:44

    I find the when it is run section slightly ambiguous - when it is run from where ? From an SVN checkout or from released code ? All the solutions work on injecting the SVN version somehow into the Python source or somewhere in the repository in a separate version file.

    The version file is changed on fresh checkouts, so clean checkouts need to be done before distribution. So my question of where the program is being run remains.

提交回复
热议问题