# Allow prefix for semver tags

**URL:** <https://drone.discourse.group/t/allow-prefix-for-semver-tags/9527>\
**Category:** Drone Support\
**Created:** [July 16, 2021, 8:27am UTC](https://drone.discourse.group/t/allow-prefix-for-semver-tags/9527 "2021-07-16T08:27:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KoltesDigital](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/koltesdigital/32/3472_2.png) [@KoltesDigital](https://drone.discourse.group/u/KoltesDigital)\
**Post date:** [July 16, 2021, 8:27am UTC](https://drone.discourse.group/t/allow-prefix-for-semver-tags/9527/1 "2021-07-16T08:27:56Z")

</div>

Hi,

Context: JS monorepo. Lerna tags new releases with the package name, e.g. `@scope/foobar@1.2.3`. While `$DRONE_TAG` is correctly set to the whole tag, `$DRONE_SEMVER` is empty, as the tag is not just a semver. I consider making a custom Docker image which would add `RUN export DRONE_SEMVER=$(echo $DRONE_TAG | sed --regexp-extended 's/^.+@//')`.

But this could benefit a lot of other projects too. For now, the runner behavior ([runner-go/environ/semver.go at 0bd0f8fc31c489817572060d17c6e24aaa487470 · drone/runner-go · GitHub](https://github.com/drone/runner-go/blob/0bd0f8fc31c489817572060d17c6e24aaa487470/environ/semver.go#L19)) is to remove the prefix `v`. Would you consider testing if env vars are set (e.g. `DRONE_RUNNER_TAG_SEMVER_REGEX` and `DRONE_RUNNER_TAG_SEMVER_REGEX_REPLACEMENT`) and in this case do something like `regexp.MustCompile(...).ReplaceAllString(...)`?
