How to set a Mercurial VCS build trigger for TeamCity that ignores label operations

后端 未结 2 1313
情深已故
情深已故 2020-12-08 22:47

I am trying to setup a build trigger for TeamCity using Mercurial as the VCS. Right now the trigger looks like:

+:/**

This trigger get fire

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 23:38

    Teamcity and the syntax above are foreign to me, but if you've got scripting capabilities you can check if a changeset is a tag-only changeset by doing something like this:

    if [ "$(hg log -r tip --template '{files}')" = '.hgtags' ]; then
        echo tag only
    else
        echo other stuff too
    fi
    

    Just swap out tip for whatever changeset you're about to act on, and change the echo statements to an exit, a make, or a hg tag as appropriate to either skip the build or just skip the creating of a new tag if the last changeset was only a tag.

提交回复
热议问题