Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [email protected] support #566

Merged
merged 7 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ matrix:
env: TEST_WITH_REAL_API=0 GOTESTFLAGS="-race -cpu=1,2,4"
- go: "1.11"
env: TEST_WITH_REAL_API=1
- go: "1.12"
env: TEST_WITH_REAL_API=0 GOTESTFLAGS="-race -cpu=1,2,4"
- go: "1.12"
env: TEST_WITH_REAL_API=1
- go: tip
env: TEST_WITH_REAL_API=0 GOTESTFLAGS="-race -cpu=1,2,4"
allow_failures:
Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GOBUILD ?= $(GO) build
GOCLEAN ?= $(GO) clean
GOINSTALL ?= $(GO) install
GOTEST ?= $(GO) test $(GOTESTFLAGS)
GOMINORVERSION ?= $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
GOFMT ?= gofmt -w -s
GODIR ?= github.com/scaleway/scaleway-cli
GOCOVER ?= $(GOTEST) -covermode=count -v
Expand All @@ -31,12 +32,12 @@ NAME = scw
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))



SOURCES := $(call rwildcard,./pkg ./cmd,*.go)
COMMANDS := $(call uniq,$(dir $(call rwildcard,./cmd/,*.go)))
PACKAGES := $(call uniq,$(dir $(call rwildcard,./pkg/,*.go))) .

REL_COMMANDS := $(subst $(GODIR),.,$(COMMANDS))
REL_PACKAGES := $(subst $(GODIR),.,$(PACKAGES))
REV = $(shell git rev-parse --short HEAD 2>/dev/null || echo "nogit")
LDFLAGS = "-X `go list ./pkg/scwversion`.GITCOMMIT=$(REV) -s"
BUILDER = scaleway-cli-builder
Expand All @@ -62,7 +63,13 @@ fmt: $(FMT_LIST)


$(BUILD_LIST): %_build: %_fmt
@go tool vet --all=true $(shell echo $(SOURCES) | tr " " "\n" | grep -v test.go)
@# https://golang.org/doc/go1.12#vet
@# vel = go tip version
@if [ $(GOMINORVERSION) = vel ] || [ $(GOMINORVERSION) -gt 11 ]; then \
$(GO) vet ./...; \
else \
$(GO) tool vet --all=true $(shell echo $(SOURCES) | tr " " "\n" | grep -v test.go); \
fi
$(GOBUILD) -ldflags $(LDFLAGS) -o $(NAME) ./cmd/$(NAME)

$(CLEAN_LIST): %_clean:
Expand Down
4 changes: 2 additions & 2 deletions cmd/scw/main_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// +build !go1.5
// +build !go1.10

package main

func error() {
`Bad go version, please install a version greater than or equal to 1.5`
`Bad go version, please install a version greater than or equal to 1.10`
}
2 changes: 1 addition & 1 deletion goversion.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// +build go1.5
// +build go1.10

package goversion
4 changes: 2 additions & 2 deletions goversion_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// +build !go1.5
// +build !go1.10

package goversion

func error() {
`Bad go version, please install a version greater than or equal to 1.5`
`Bad go version, please install a version greater than or equal to 1.10`
}
191 changes: 191 additions & 0 deletions vendor/github.com/containerd/console/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/containerd/console/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions vendor/github.com/containerd/console/console.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading