From f1c87ac373925fd21ceb06199cf44017ad5e6c3d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 25 Dec 2018 05:11:31 +0900 Subject: [PATCH] docs: Update --- _docs/gen.go | 7 ++++++- docs/index.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/_docs/gen.go b/_docs/gen.go index 2042aa66b..d385d8d78 100644 --- a/_docs/gen.go +++ b/_docs/gen.go @@ -43,6 +43,11 @@ var ( devVersion = "" ) +func majorMinor(ver string) string { + t := strings.Split(ver, ".") + return t[0] + "." + t[1] +} + func init() { b, err := exec.Command("git", "tag").Output() if err != nil { @@ -69,7 +74,7 @@ func init() { stableVersion = stableVers[len(stableVers)-1] rcVersion = rcVers[len(rcVers)-1] - if rcVersion[:strings.Index(rcVersion, "-")] == stableVersion { + if majorMinor(rcVersion[:strings.Index(rcVersion, "-")]) == majorMinor(stableVersion) { rcVersion = "" } devVersion = devVers[len(devVers)-1] diff --git a/docs/index.html b/docs/index.html index f852f5e74..c8a283094 100644 --- a/docs/index.html +++ b/docs/index.html @@ -38,7 +38,7 @@
Stable Version
-
v1.8.0
+
v1.8.1
Development Version
v1.9.0-alpha