I highly recommend using python-semantic-release instead. It provides full control over the release creation and does not have roadblocks in place preventing you from using it on non-latest commits. Still, if using semantic-release is a must, above scripts provide the means to do so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Implementation of https://gitlab.com/gitlab-org/gitlab/-/blob/master/gems/gitlab-utils/lib/gitlab/utils.rb#L56 | |
slugify() { | |
local reply | |
unset REPLY ERR | |
reply="${*,,}" | |
reply="${reply//[^a-z0-9]/-}" | |
reply="${reply:0:63}" | |
while [[ ${reply} == -* ]]; do reply="${reply#-}"; done | |
while [[ ${reply} == *- ]]; do reply="${reply%-}"; done |