Within circle.yml, I use regular expressions to match tag names in the format “v1.2.3”.
deployment:
production:
tag: /(v[0-9]\.[0-9]\.[0-9])/
commands:
- ./deploy.sh production $tag
I need the deploy.sh script to know what tag is currently matched, but referring to it as $tag doesn’t pass the tag name to the script. Is there a way to do this?
Well you still need to regex part if you want the deploy section to trigger based on tags. I’m saying that instead of passing $tag to the deploy script, pass $CIRCLE_TAG.