我正在使用自定义生成版本递增程序。对于minGW编译器,我可以只使用简单的cmd脚本,如下所示:
@echo off
binc -inc // Increments build version and logs .exe file last modify date
@echo on
g++ foo.cpp -o foo
@echo off
binc -check // Checks .exe file, if last modify date is same, decrements build version
@echo on
但是,在Visual Studio Post中,如果构建失败,则不会触发Build事件,因此无法运行此类检查。目前唯一的解决方案是,如果构建失败,则手动运行程序的递减版本。
也许有某种方法可以在构建失败后自动启动它?还是至少在构建失败后触发发布构建事件?