Automatic version number both in setup.py (setuptools) AND source code?

前端 未结 7 1355
没有蜡笔的小新
没有蜡笔的小新 2020-12-24 11:21

SITUATION:

I have a python library, which is controlled by git, and bundled with distutils/setuptools. And I want to automatically generate version

7条回答
  •  一向
    一向 (楼主)
    2020-12-24 11:48

    If you found versioneer excessively convoluted, you can try bump2version.

    Just add a configuration file in the root of your library, that indicates where are the files containing the version number, and then via its CLI, you type:

    bumpversion minor
    

    to release a minor version (patch or major otherwise).

    There are other flag-options, and config options, such as tagging automatically the repository, for which you can check the official documentation.

提交回复
热议问题