Skip to content

Commit 3c4bf50

Browse files
committed
Bump gotty-client with godep support
1 parent 210dbf0 commit 3c4bf50

File tree

369 files changed

+110232
-1574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

369 files changed

+110232
-1574
lines changed

Godeps/Godeps.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Go parameters
2-
GOCMD ?= go
3-
GOBUILD ?= $(GOCMD) build
4-
GOCLEAN ?= $(GOCMD) clean
5-
GOINSTALL ?= $(GOCMD) install
6-
GOTEST ?= $(GOCMD) test
2+
GOENV ?= GO15VENDOREXPERIMENT=1
3+
GO ?= $(GOENV) go
4+
GODEP ?= $(GOENV) godep
5+
GOBUILD ?= $(GO) build
6+
GOCLEAN ?= $(GO) clean
7+
GOINSTALL ?= $(GO) install
8+
GOTEST ?= $(GO) test
79
GOFMT ?= gofmt -w
10+
GODIR ?= github.com/scaleway/scaleway-cli
811
GOCOVER ?= $(GOTEST) -covermode=count -v
9-
1012
FPM_VERSION ?= $(shell ./dist/scw-Darwin-i386 --version | sed 's/.*v\([0-9.]*\),.*/\1/g')
1113
FPM_DOCKER ?= \
1214
-it --rm \
@@ -23,32 +25,34 @@ FPM_ARGS ?= \
2325
-m "Scaleway <[email protected]>"
2426

2527

26-
NAME = scw
27-
SRC = cmd/scw
28-
PACKAGES = pkg/api pkg/commands pkg/utils pkg/cli pkg/sshcommand pkg/config pkg/scwversion pkg/pricing
29-
VERSION = $(shell cat .goxc.json | grep "PackageVersion" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
30-
REV = $(shell git rev-parse HEAD || git ls-remote https://github.com/scaleway/scaleway-cli | grep -F $(VERSION) | head -n1 | awk '{print $$1}' || echo "nogit")
31-
TAG = $(shell git describe --tags --always || echo $(VERSION) || echo "nogit")
28+
NAME = scw
29+
30+
SOURCES := $(shell find . -type f -name "*.go")
31+
COMMANDS := $(shell go list ./... | grep -v /vendor/ | grep /cmd/)
32+
PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /cmd/)
33+
VERSION = $(shell cat .goxc.json | grep "PackageVersion" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
34+
REV = $(shell git rev-parse HEAD || git ls-remote https://github.com/scaleway/scaleway-cli | grep -F $(VERSION) | head -n1 | awk '{print $$1}' || echo "nogit")
35+
TAG = $(shell git describe --tags --always || echo $(VERSION) || echo "nogit")
3236
LDFLAGS = "-X github.com/scaleway/scaleway-cli/pkg/scwversion.GITCOMMIT=$(REV) \
3337
-X github.com/scaleway/scaleway-cli/pkg/scwversion.VERSION=$(TAG)"
34-
BUILDER = scaleway-cli-builder
35-
ALL_GO_FILES = $(shell find . -type f -name "*.go")
38+
BUILDER = scaleway-cli-builder
39+
ALL_GO_FILES = $(shell find . -type f -name "*.go")
3640

3741
# Check go version
38-
GOVERSIONMAJOR = $(shell go version | grep -o '[1-9].[0-9]' | cut -d '.' -f1)
39-
GOVERSIONMINOR = $(shell go version | grep -o '[1-9].[0-9]' | cut -d '.' -f2)
42+
GOVERSIONMAJOR = $(shell $(GO) version | grep -o '[1-9].[0-9]' | cut -d '.' -f1)
43+
GOVERSIONMINOR = $(shell $(GO) version | grep -o '[1-9].[0-9]' | cut -d '.' -f2)
4044
VERSION_GE_1_5 = $(shell [ $(GOVERSIONMAJOR) -gt 1 -o $(GOVERSIONMINOR) -ge 5 ] && echo true)
4145
ifneq ($(VERSION_GE_1_5),true)
4246
$(error Bad go version, please install a version greater than or equal to 1.5)
4347
endif
4448

45-
BUILD_LIST = $(foreach int, $(SRC), $(int)_build)
46-
CLEAN_LIST = $(foreach int, $(SRC) $(PACKAGES), $(int)_clean)
47-
INSTALL_LIST = $(foreach int, $(SRC), $(int)_install)
48-
IREF_LIST = $(foreach int, $(SRC) $(PACKAGES), $(int)_iref)
49-
TEST_LIST = $(foreach int, $(SRC) $(PACKAGES), $(int)_test)
50-
FMT_LIST = $(foreach int, $(SRC) $(PACKAGES), $(int)_fmt)
51-
COVERPROFILE_LIST = $(foreach int, $(PACKAGES), $(int)/profile.out)
49+
BUILD_LIST = $(foreach int, $(COMMANDS), $(int)_build)
50+
CLEAN_LIST = $(foreach int, $(COMMANDS) $(PACKAGES), $(int)_clean)
51+
INSTALL_LIST = $(foreach int, $(COMMANDS), $(int)_install)
52+
IREF_LIST = $(foreach int, $(COMMANDS) $(PACKAGES), $(int)_iref)
53+
TEST_LIST = $(foreach int, $(COMMANDS) $(PACKAGES), $(int)_test)
54+
FMT_LIST = $(foreach int, $(COMMANDS) $(PACKAGES), $(int)_fmt)
55+
COVERPROFILE_LIST = $(foreach int, $(PACKAGES), $(int)/profile.out)
5256

5357

5458
.PHONY: $(CLEAN_LIST) $(TEST_LIST) $(FMT_LIST) $(INSTALL_LIST) $(BUILD_LIST) $(IREF_LIST)
@@ -68,18 +72,18 @@ fmt: $(FMT_LIST)
6872

6973

7074
$(BUILD_LIST): %_build: %_fmt %_iref
71-
$(GOBUILD) -ldflags $(LDFLAGS) -o $(NAME) ./$*
72-
go tool vet -all=true $(PACKAGES) $(SRC)
75+
$(GOBUILD) -ldflags $(LDFLAGS) -o $(NAME) $(subst $(GODIR),./,$*)
76+
$(GO) tool vet -all=true $(PACKAGES) $(COMMANDS)
7377
$(CLEAN_LIST): %_clean:
74-
$(GOCLEAN) ./$*
78+
$(GOCLEAN) $(subst $(GODIR),./,$*)
7579
$(INSTALL_LIST): %_install:
76-
$(GOINSTALL) ./$*
80+
$(GOINSTALL) $(subst $(GODIR),./,$*)
7781
$(IREF_LIST): %_iref:
78-
$(GOTEST) -ldflags $(LDFLAGS) -i ./$*
82+
$(GOTEST) -ldflags $(LDFLAGS) -i $(subst $(GODIR),./,$*)
7983
$(TEST_LIST): %_test:
80-
$(GOTEST) -ldflags $(LDFLAGS) -v ./$*
84+
$(GOTEST) -ldflags $(LDFLAGS) -v $(subst $(GODIR),./,$*)
8185
$(FMT_LIST): %_fmt:
82-
$(GOFMT) ./$*
86+
$(GOFMT) $(subst $(GODIR),./,$*)
8387

8488

8589

@@ -130,18 +134,22 @@ packages:
130134
#publish_packages:
131135
# docker run -v $(PWD)/dist moul/dput ppa:moul/scw dist/scw_$(FPM_VERSION)_arm.changes
132136

137+
138+
.PHONY: golint
133139
golint:
134-
@go get github.com/golang/lint/golint
135-
@for dir in $(shell go list ./... | grep -v /vendor/); do golint $$dir; done
140+
@$(GO) get github.com/golang/lint/golint
141+
@for dir in $(shell $(GO) list ./... | grep -v /vendor/); do golint $$dir; done
136142

137143

144+
.PHONY: gocyclo
138145
gocyclo:
139146
go get github.com/fzipp/gocyclo
140147
gocyclo -over 15 $(shell find . -name "*.go" -not -name "*test.go" | grep -v /vendor/)
141148

142149

143-
party:
144-
party -c -d=vendor
150+
.PHONY: godep-save
151+
godep-save:
152+
$(GODEP) save $(PACKAGES) $(COMMANDS)
145153

146154

147155
.PHONY: convey

cmd/scw/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ package main
1111
import (
1212
"os"
1313

14-
"github.com/scaleway/scaleway-cli/pkg/cli"
1514
"github.com/Sirupsen/logrus"
15+
"github.com/scaleway/scaleway-cli/pkg/cli"
1616
)
1717

1818
func main() {

vendor/github.com/moul/gotty-client/.goxc.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moul/gotty-client/Godeps/Godeps.json

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moul/gotty-client/Godeps/Readme

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moul/gotty-client/Makefile

Lines changed: 51 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moul/gotty-client/README.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moul/gotty-client/cmd/gotty-client/main.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moul/gotty-client/contrib/homebrew/gotty-client.rb

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)