Skip to content

Commit

Permalink
Release 3.3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmigpin committed Jun 13, 2022
1 parent f5b6dd0 commit 244a24b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
30 changes: 23 additions & 7 deletions core/version.go
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 244a24b

Please sign in to comment.