qiwi / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
86 stars 34 forks source link

feat: add --tag-format flag #56

Closed Cid53 closed 2 years ago

Cid53 commented 2 years ago

Adds a flag to modify the version format used to create tagFormat.

Use Case

I'm attempting to use the generated tags to publish Docker images and Docker tags cannot contain an @.

antongolub commented 2 years ago

Hey, @Cid53,

Ok, seems fine, but let's simplify this a bit. We can introduce --tag-format instead in lodash template notation as just like semrel expects:

...
tagFormatCtx = {
   name,
   version: '${version}'
}
tagFormatDefault = '${name}@${version}'
tagFormat = template(options.tagFormat || tagFormatDefault)(tagFormatCtx)
Cid53 commented 2 years ago

@antongolub Sounds good! I wasn't sure how important it was to enforce the package name to be the first part of the tag.

I made those changes you suggested, thanks!

antongolub commented 2 years ago

@Cid53,

The new feature is on the way. Thanks for the contribution.

qiwibot commented 2 years ago

:tada: This PR is included in version 3.16.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: