Skip to content

Conversation

@vbatts
Copy link
Member

@vbatts vbatts commented Mar 19, 2016

closes #350

Signed-off-by: Vincent Batts vbatts@hashbangbash.com

.travis.yml Outdated
before_install:
- go get golang.org/x/tools/cmd/vet
- go get github.com/golang/lint/golint
- go version | grep -qE '(go1.5|go1.6)' && go get github.com/golang/lint/golint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grep -q 'go1.[56]' should be sufficient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, but now i'm trying to figure out the proper subterminal return codes,
because this is now failing as grep is not finding the version

On Sat, Mar 19, 2016 at 11:50 AM, W. Trevor King notifications@github.com
wrote:

In .travis.yml
#352 (comment):

@@ -8,13 +9,13 @@ sudo: false

before_install:

  • go get golang.org/x/tools/cmd/vet
      • go get github.com/golang/lint/golint
      • go version | grep -qE '(go1.5|go1.6)' && go get github.com/golang/lint/golint

grep -q 'go1.[56]' should be sufficient.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/opencontainers/specs/pull/352/files/60c7a94edb5c008ef08bbfecaf22f4758d5a242d#r56750650

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vbatts what about doing something like what I did for containerd to check for a minimum version?: docker-archive/containerd@c6680da

@vbatts vbatts force-pushed the go-version-golint branch from 60c7a94 to cb02ebd Compare March 21, 2016 14:54
@vbatts
Copy link
Member Author

vbatts commented Mar 21, 2016

my goodness. Travis is having API threshold issues, but this finally passes.

golint is only done for go1.5 and go1.6.

PTAL

@wking
Copy link
Contributor

wking commented Mar 21, 2016 via email

@marcosnils
Copy link

@wking @vbatts this won't work with any version greater that 1.6. Have you checked my comment?

#352 (comment) ?

@wking
Copy link
Contributor

wking commented Mar 21, 2016

On Mon, Mar 21, 2016 at 10:42:32AM -0700, Marcos Nils wrote:

@wking @vbatts this won't work with any version greater that
1.6. Have you checked my comment?

#352 (comment) ?

This approach looks fine to me to, although bumping @vbatts' approach
as we add/remove Go implementations from the Travis config doesn't
seem like it would be too hard.

@vbatts
Copy link
Member Author

vbatts commented Mar 21, 2016

@marcosnils I looked, but it's not like the specs code doesn't support prior golang versions, but that we can't use the golint tool.

@marcosnils
Copy link

@vbatts exactly. By following the approach I'm proposing you wouldn't have to change the regex each time a new golang version is added to the travis file. You just specify the minimum version which golint needs and that's it.

It might be a good idea also to add the tip version to the travis file so we can know beforehand if any changed made into Go might break something in the specs.

closes opencontainers#350

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
@vbatts vbatts force-pushed the go-version-golint branch from cb02ebd to 54cd96d Compare March 21, 2016 18:29
@vbatts
Copy link
Member Author

vbatts commented Mar 21, 2016

k. I've updated it, but the travis before_install step would end up overlapping a bit with this PR https://github.com/opencontainers/specs/pull/349/files#diff-b67911656ef5d18c4ae36cb6741b7965R70

I can consolidate one or the other, for it be be cleaner and all done in the Makefile

@marcosnils
Copy link

@vbatts +1 to consolidate.

@mrunalp
Copy link
Contributor

mrunalp commented Mar 23, 2016

@vbatts Is the build expected to pass here?

@vbatts
Copy link
Member Author

vbatts commented Mar 23, 2016

@mrunalp all green

@crosbymichael
Copy link
Member

LGTM

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Mar 23, 2016

LGTM

@mrunalp mrunalp merged commit 691faa0 into opencontainers:master Mar 23, 2016
@vbatts vbatts deleted the go-version-golint branch April 12, 2016 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

golint now requires go1.5

5 participants