miniscruff/changie

Please support "VersionNoPrefix" in "versionFormat"

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.

I like to have version numbers without the leading "v" in my CHANGELOG.md - just the semantic version, not the git tag convention:

## 1.2.3 - 2006-01-02

I already tried to set "versionFormat" accordingly:

versionFormat: '## {{.VersionNoPrefix}} - {{.Time.Format "2006-01-02"}}'

but changie returns an error:

template: ## {{.VersionNoPrefix}} - {{.Time.Format "2006-01-02"}}:1:5: executing "## {{.VersionNoPrefix}} - {{.Time.Format \"2006-01-02\"}}" at <.VersionNoPrefix>: can't evaluate field VersionNoPrefix in type *core.BatchData

Describe the solution you'd like

Please add support so that "versionFormat" understands the "VersionNoPrefix" replacement.

Describe alternatives you've considered

I like to have semantic version tags in a distinct namespace starting with "v" to have a clear separation between other tags like "save_old_version". Switching to non "v" prefixed git tags is not an option.

I can use the following as workaround:

versionFormat: '## {{.Major}}.{{.Minor}}.{{.Patch}} - {{.Time.Format "2006-01-02"}}'

But this does not work well with pre-release versions when the pre-release part of the version string is available sometimes only.

Additional context

N/A

I definitely agree with this and it does look like that is not included in the batch data.