Running step when tag suffix is matched

If we wanted to have a convention like:

v1234
v4567

And then tag hotfix releases like:

v4567.1
v4567.2

Is it possible to have Drone trigger a step when the .* suffix is provided?

when:
  ref: refs/tags/v*.*

The docs only mention prefix matching. Right now our projects use prefixes like v or rel but it’d be nice to use suffix matching instead.

drone uses the path.Match function for matching parameters, which supports a glob syntax. The glob syntax is not restricted to prefix or suffix, and can be used anywhere in a string. You can read more about the syntax and see some examples of how this function works here:

https://golang.org/pkg/path/#Match
https://golang.org/pkg/path/#example_Match

1 Like

It would be awesome to have this in the docs, then! Maybe I’ll submit a PR!

Just for posterity and so I don’t forget, you totally can use that code block I originally posted above. :+1: The golang docs linked above are a nice way to verify expressions in the browser.

PR: https://github.com/drone/docs/pull/377