Greetings folks! Big fan of the service :) I'm trying to set up a job to run only on creation of tags that match a particular regex. Reading the docs:
https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
It is hard to tell if the =~ operator accepts a regex or not:
check_aggreement_task:
only_if: $CIRRUS_BRANCH =~ 'pull/.*'
I'd like to do something like this:
publish_task:
only_if: $CIRRUS_TAG =~ '/^v\d+(\.\d+){2}(-.*)?$/'
I keep getting FAILED_PRECONDITION: java.lang.IllegalArgumentException when I try to use a regex, and I'm not sure if I'm just doing something wrong :)
Oh snap! Parser of expressions is chocking on the parentesises in the regex. I'll fix but in the meantime you can use something like 'v\d+\.\d+\.\d+-?.*?' to match v1.2.3-rc1 tags. Sorry for the inconvenience and thanks for reporting!