如何在每次推送时使用 Git 进行版本更改(递增 +1)?
例如,我有两个 PHP 文件。
libs/lib1.php
libs/lib2.php
每个标题上通常会有一些信息,例如:/**
* LIB1.PHP
* this libs does something like this
* and that this is a doc for you
* @version 145
* @todo something todo
* @author DAMS
*/
/**
* LIB2.PHP
* this libs does something like this
* and that this is a doc for you
* @version 445
* @todo something todo
* @author DAMS
*/
我们能否在每次推送时搜索并将版本号+1添加到代码中?