Skip to content

Commit

Permalink
Updated to go1.11rc1 (gomods#482)
Browse files Browse the repository at this point in the history
* updated to rc1

* latest test
  • Loading branch information
michalpristas authored and marwan-at-work committed Aug 15, 2018
1 parent 211eb93 commit d088208
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
language: go
install: false
go:
- "1.11beta3"
- "1.11rc1"
env:
global:
- PATH=${PATH}:./bin
Expand Down
10 changes: 5 additions & 5 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion docs/content/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/intro/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions pkg/download/goget/goget.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"io"
"os/exec"
"strings"
"time"

"github.com/gomods/athens/pkg/config"
Expand Down Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions pkg/download/goget/goget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ 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),
},
},
{
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),
},
},
}

Expand Down Expand Up @@ -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),
},
},
Expand All @@ -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),
},
},
Expand Down
2 changes: 0 additions & 2 deletions pkg/storage/rev_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d088208

Please sign in to comment.