diff --git a/README.md b/README.md index df733504..54f3feb0 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ This project is not using "vX" named directories. So version 3 is not in the dir Currently a release will be tagged with two tags that refer to the same version (ex: 3.3.0 and 1.3.3 is the same version). -Feel free to file an issue if you know of a better solution that doesn't require to use an import path of a directory that might not exist (case of using "vX" dirs). +Feel free to file an issue if you know of a better solution that doesn't require to use an import path of a directory that might not exist (case of using "vX" import paths). ## Usage @@ -559,11 +559,11 @@ The measuring of space is done as follows: - Acme editor: https://www.youtube.com/watch?v=dP1xVpMPn8M ## Releases -- 2022/06/??: v3.3.0 (52 commits) - TO BE RELEASED +- 2022/06/13: v3.3.0 (52 commits) - godebug: new improved annotator, as well as a new implementation using overlays that takes advantage of the go cache to speed up compiling. - lsproto: goto implementation - lsproto: callers and callees - - lsproto: fixes that improved response speed + - lsproto: improved response speed - many other bug fixes and improvements - note: v3.2.0 was bypassed and not released - 2021/07/27: v3.1.0 (40 commits) diff --git a/core/version.go b/core/version.go index 7e08a4fe..484abcc9 100644 --- a/core/version.go +++ b/core/version.go @@ -1,17 +1,33 @@ package core +import ( + "fmt" + "time" +) + func Version() string { // NOTE: equivalent "go get" version in format x.y.z is 1.x.y (z not used) (ex: 3.3.0 -> 1.3.3). This is done because go doesn't seem to allow having versions bigger then 1 without altering the import paths. - v := "3.3.0" - return taggedVersion(v) + return timedVersion(v, true) } - -func taggedVersion(v string) string { +func timedVersion(v string, release bool) string { + t := versionTime() + if !release { + tag := t.Format("200601021504") + return fmt.Sprintf("%s-rc.%s", v, tag) // release-candidate format + //return fmt.Sprintf("%s+%s", tag) // build-metadata format (ignored to determine version precedence) + } + return fmt.Sprintf("%s (%s)", v, t.Format("2006/01/02 15:04")) +} +func versionTime() time.Time { // auto-updated with "go generate" from main directory - date := "#___202206112203___#" + date := "#___202206131603___#" tag := date[4 : len(date)-4] - return v + "-rc." + tag // release candidate format - //return v + "+" + tag // build metadata format (ignored to determine version precedence) + layout := "200601021504" + t, err := time.Parse(layout, tag) + if err != nil { + panic(err) + } + return t }