1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

fix(version): change development version naming to avoid breaking some clients

Some Miniflux clients expect a specific version format.
For example, Flux News converts the string version to an integer.

Using `Development Version` will break some clients.
This commit is contained in:
Frédéric Guillot 2025-08-18 17:35:09 -07:00
parent f6532e16f2
commit 9536ce7dbc
3 changed files with 7 additions and 4 deletions

View file

@ -32,6 +32,7 @@ type funcMap struct {
// Map returns a map of template functions that are compiled during template parsing. // Map returns a map of template functions that are compiled during template parsing.
func (f *funcMap) Map() template.FuncMap { func (f *funcMap) Map() template.FuncMap {
return template.FuncMap{ return template.FuncMap{
"contains": strings.Contains,
"startsWith": strings.HasPrefix, "startsWith": strings.HasPrefix,
"formatFileSize": formatFileSize, "formatFileSize": formatFileSize,
"dict": dict, "dict": dict,

View file

@ -13,10 +13,10 @@
<ul> <ul>
<li> <li>
<strong>{{ t "page.about.version" }}</strong> <strong>{{ t "page.about.version" }}</strong>
{{ if startsWith .version "2." }} {{ if contains .version "dev" }}
<a href="https://github.com/miniflux/v2/releases/tag/{{ .version }}">{{ .version }}</a>
{{ else }}
{{ .version }} {{ .version }}
{{ else }}
<a href="https://github.com/miniflux/v2/releases/tag/{{ .version }}">{{ .version }}</a>
{{ end }} {{ end }}
</li> </li>
{{ if .commit }} {{ if .commit }}

View file

@ -43,7 +43,9 @@ func getBuildDate() string {
// Falls back to values from the Go module's build info when available. // Falls back to values from the Go module's build info when available.
func init() { func init() {
if Version == "" { if Version == "" {
Version = "Development Version" // Some Miniflux clients expect a specific version format.
// For example, Flux News converts the string version to an integer.
Version = "2.2.x-dev"
} }
if Commit == "" { if Commit == "" {
Commit = getCommit() Commit = getCommit()