From d088208941a651745d1a9d616954d9166b3e9c38 Mon Sep 17 00:00:00 2001 From: Michal Pristas Date: Wed, 15 Aug 2018 18:26:43 +0200 Subject: [PATCH] Updated to go1.11rc1 (#482) * updated to rc1 * latest test --- .travis.yml | 2 +- DEVELOPMENT.md | 10 +++++----- docs/content/faq.md | 2 +- docs/content/intro/components.md | 2 +- pkg/download/goget/goget.go | 7 ------- pkg/download/goget/goget_test.go | 11 ++++------- pkg/storage/rev_info.go | 2 -- 7 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9daaf012..349997c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ services: language: go install: false go: - - "1.11beta3" + - "1.11rc1" env: global: - PATH=${PATH}:./bin diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d08bfcc8..a84bda77 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -16,17 +16,17 @@ Athens is developed on Go1.11+. If you have a stable version of go running, then a later version of go can be downloaded. -For example, to get `go1.11beta3`, run the following commands which won't affect your stable version +For example, to get `go1.11rc1`, run the following commands which won't affect your stable version ``` -go get golang.org/dl/go1.11beta3 -go1.11beta3 download +go get golang.org/dl/go1.11rc1 +go1.11rc1 download ``` -To point Athens to `go1.11beta3` or to a different version +To point Athens to `go1.11rc1` or to a different version set the following environment variable ``` -GO_BINARY_PATH=go1.11beta3 +GO_BINARY_PATH=go1.11rc1 or whichever binary you want to use with athens ``` diff --git a/docs/content/faq.md b/docs/content/faq.md index 1173df48..825fad02 100644 --- a/docs/content/faq.md +++ b/docs/content/faq.md @@ -20,7 +20,7 @@ So, if you look back to "architecture" above, there are a few discrete "things" ## Does Athens integrate with the go toolchain? -Athens is currently supported by the Go 1.11beta3 toolchain via the [download protocol](/intro/protocol/). +Athens is currently supported by the Go 1.11rc1 toolchain via the [download protocol](/intro/protocol/). For the TL;DR of the protocol, it's a REST API that lets the go toolchain (i.e. go get) see lists of versions and fetch source code for a specific version. diff --git a/docs/content/intro/components.md b/docs/content/intro/components.md index a0026f02..0e3bf2cd 100644 --- a/docs/content/intro/components.md +++ b/docs/content/intro/components.md @@ -7,7 +7,7 @@ From a very high-level view, we recognize 4 major components of the system. ### Client -The client is a user, powered by go binary with module support. At the moment of writing this document, it is `go1.11beta3` +The client is a user, powered by go binary with module support. At the moment of writing this document, it is `go1.11rc1` ### VCS diff --git a/pkg/download/goget/goget.go b/pkg/download/goget/goget.go index 054f8978..b2936d2f 100644 --- a/pkg/download/goget/goget.go +++ b/pkg/download/goget/goget.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "os/exec" - "strings" "time" "github.com/gomods/athens/pkg/config" @@ -78,13 +77,7 @@ func (gg *goget) Latest(ctx context.Context, mod string) (*storage.RevInfo, erro return nil, errors.E(op, err) } - pseudoInfo := strings.Split(lr.Version, "-") - if len(pseudoInfo) < 3 { - return nil, errors.E(op, fmt.Errorf("malformed pseudoInfo %v", lr.Version)) - } return &storage.RevInfo{ - Name: pseudoInfo[2], - Short: pseudoInfo[2], Time: lr.Time, Version: lr.Version, }, nil diff --git a/pkg/download/goget/goget_test.go b/pkg/download/goget/goget_test.go index 0fce3da2..ebe6efb6 100644 --- a/pkg/download/goget/goget_test.go +++ b/pkg/download/goget/goget_test.go @@ -58,8 +58,6 @@ var latestTests = []latestTest{ name: "happy path", path: "github.com/athens-artifacts/no-tags", info: &storage.RevInfo{ - Name: "1a540c5d67ab", - Short: "1a540c5d67ab", Version: "v0.0.0-20180803171426-1a540c5d67ab", Time: time.Date(2018, 8, 3, 17, 14, 26, 0, time.UTC), }, @@ -67,7 +65,10 @@ var latestTests = []latestTest{ { name: "tagged latest", path: "github.com/athens-artifacts/happy-path", - err: true, + info: &storage.RevInfo{ + Version: "v0.0.3", + Time: time.Date(2018, 8, 3, 17, 16, 00, 0, time.UTC), + }, }, } @@ -103,9 +104,7 @@ var infoTests = []infoTest{ path: "github.com/athens-artifacts/happy-path", version: "v0.0.2", info: &storage.RevInfo{ - Name: "3017822275edeb343d2d2a56345f9a58090514d8", Version: "v0.0.2", - Short: "3017822275ed", Time: time.Date(2018, 8, 3, 3, 45, 19, 0, time.UTC), }, }, @@ -114,9 +113,7 @@ var infoTests = []infoTest{ path: "github.com/athens-artifacts/no-tags", version: "v0.0.0-20180803035119-e4e0177efdb5", info: &storage.RevInfo{ - Name: "e4e0177efdb573c110217ccb01f2069f961154f3", Version: "v0.0.0-20180803035119-e4e0177efdb5", - Short: "e4e0177efdb5", Time: time.Date(2018, 8, 3, 3, 51, 19, 0, time.UTC), }, }, diff --git a/pkg/storage/rev_info.go b/pkg/storage/rev_info.go index 819bff60..f68a7bcd 100644 --- a/pkg/storage/rev_info.go +++ b/pkg/storage/rev_info.go @@ -11,7 +11,5 @@ import ( // (see "Download Protocol" header) type RevInfo struct { Version string `json:"Version"` // version string - Name string `json:"Name"` // complete ID in underlying repository - Short string `json:"Short"` // shortened ID, for use in pseudo-version Time time.Time `json:"Time"` // commit time }