Appveyor treats branch and tag as same when receiving webhook from github

ericnewton76's Avatar

ericnewton76

07 Jan, 2018 05:36 AM

Why does it do this? Kinda strange because I wanna do builds from master branch always,

...and do deploys only when branch=master & APPVEYOR_REPO_TAG=true.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 08 Jan, 2018 08:33 PM

    Ilya Finkelshteyn's Avatar

    This is most probably annotated tag. If you check webhook content sent to AppVeyor can see that "base_ref": null in this webhook (it it always this way for annotated tags). Therefore AppVeyor sets tag name (e.g. v2.2.0 in this case) as a branch name.

    What you can do is to add regular expression to your deployment-on-branch condition
    which matches master branch and your current and future tag names. It could look like this /master|^v\d+\.\d+\.\d+$/. Note that this is just a sample regular expression you need to tune it more. Also note that it should be wrapped in // for AppVeyor to threat it as a regular expression.

    Please let us know if this works for you.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • appveyor_branch_tag_same.png 21.2 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac