-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Dear @mdomke, thank you for the tool!
Please consider allowing more flexible formatting of the output string.
- Use case: I usually add a branch name to version, and our developers use short
devbranch name, instead ofdevelop. Thus, end result is often confusing1.0.0.dev.1-ce117b4b-dev(using-instead of+because Docker tags are not compatible with semver). - Use case: When explaining to developers as DevOps engineer new proposed versioning scheme based on your project, I often need to mention, that
.dev=number of commits since the last commit, which is not self-evident. I would either completeley remove it, or replace with.commit, which would make it self-evident.
I'd like to avoid post-string-replacement (s/.dev/.commit/), thus asking you here.
Essentially it means a new variable for this line
P.S. This may be solved, with making format itself configurable. As of now, you have hardcoded choice of formats.
- Existing tool that implements it this way, is e.g.
date,date +%Y%m%d-%H:%M:%S, - This would result in usage:
git-semver -format '%X.%Y.%Z-dev.%N+%S'. (%S - SHA)
Such method would also allow other functionality to be easily added, e.g.
- like branch name
%B, while preserving default format intact - or making generated version compatible with Docker tags out of the box.
- will allow to use user-defined $VARIABLES in a format string, which opens complete freedom, without a need of post-processing.
peterkc, alexandrovas and christiansen-merel
Metadata
Metadata
Assignees
Labels
No labels