Skip to content

Commit a0bcbc8

Browse files
committed
Merge pull request #4341 from mboersma/go-cli-to-client
Move go cli to client/
2 parents 78ab6cf + 2e9f900 commit a0bcbc8

110 files changed

Lines changed: 204 additions & 3199 deletions

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ logs/
2424
# local binaries, installers, and artifacts
2525
builder/rootfs/usr/bin
2626
cache/image/bin/
27-
client/dist/
28-
client/makeself/
29-
client-go/deis
30-
client-go/deis.exe
27+
client/deis
28+
client/deis.exe
3129
contrib/azure/azure-user-data
3230
contrib/bumpver/bumpver
3331
deisctl/deisctl

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ GO_PACKAGES_REPO_PATH = $(addprefix $(repo_path)/,$(GO_PACKAGES))
1212

1313
COMPONENTS=builder cache controller database logger logspout publisher registry router $(STORE_IF_STATEFUL)
1414
START_ORDER=publisher $(STORE_IF_STATEFUL) logger logspout database cache registry controller builder router
15-
CLIENTS=client client-go deisctl
15+
CLIENTS=client deisctl
1616

1717
all: build run
1818

client-go/LICENSE

Lines changed: 0 additions & 13 deletions
This file was deleted.

client-go/Makefile

Lines changed: 0 additions & 40 deletions
This file was deleted.

client/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2013, 2014 Engine Yard, Inc.
1+
Copyright 2015 Engine Yard, Inc.
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

client/MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

client/Makefile

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1+
include ../includes.mk
12

2-
build: setup-venv
3-
venv/bin/pip install --disable-pip-version-check -r requirements.txt git+https://github.com/pyinstaller/pyinstaller@32bbb954b355937ccfe377afbe56979db79a7b30
4-
venv/bin/pyinstaller deis.spec
5-
chmod +x dist/deis
3+
# the filepath to this repository, relative to $GOPATH/src
4+
repo_path = github.com/deis/deis/client
5+
6+
GO_FILES = $(wildcard *.go)
7+
GO_PACKAGES = parser cmd controller/api controller/client $(wildcard controller/models/*) $(wildcard pkg/*)
8+
GO_PACKAGES_REPO_PATH = $(addprefix $(repo_path)/,$(GO_PACKAGES))
9+
10+
COMPONENT = $(notdir $(repo_path))
11+
IMAGE = $(IMAGE_PREFIX)/$(COMPONENT):$(BUILD_TAG)
12+
13+
build:
14+
CGO_ENABLED=0 godep go build -a -installsuffix cgo -ldflags '-s' -o deis .
15+
@$(call check-static-binary,deis)
616

7-
# Install deis client locally through pip.
817
install:
9-
pip install .
10-
11-
# Remove the installed copy of the deis client through pip.
12-
uninstall:
13-
pip uninstall -y deis
14-
15-
# Clean up after setup.py droppings.
16-
clean:
17-
rm -rf build/ dist/ *.egg-info
18-
19-
installer: build
20-
@if [ ! -d makeself ]; then git clone -b single-binary https://github.com/deis/makeself.git; fi
21-
PATH=./makeself:$$PATH BINARY=deis makeself.sh --bzip2 --current --nox11 dist \
22-
dist/deis-cli-`grep '__version__\ =\ ' deis.py | cut -d' ' -f3 | tr -d \'`-`go env GOOS`-`go env GOARCH`.run \
23-
"Deis CLI" "echo \
24-
&& echo 'deis is in the current directory. Please' \
25-
&& echo 'move deis to a directory in your search PATH.' \
26-
&& echo \
27-
&& echo 'See http://docs.deis.io/ for documentation.' \
28-
&& echo"
29-
30-
setup-venv:
31-
@if [ ! -d venv ]; then virtualenv venv; fi
32-
33-
test-style: setup-venv
34-
venv/bin/pip install --disable-pip-version-check -q flake8==2.4.1
35-
venv/bin/flake8
18+
godep go install -v .
19+
20+
setup-root-gotools:
21+
sudo GOPATH=/tmp/tmpGOPATH go get -u -v golang.org/x/tools/cmd/cover
22+
sudo GOPATH=/tmp/tmpGOPATH go get -u -v golang.org/x/tools/cmd/vet
23+
sudo rm -rf /tmp/tmpGOPATH
24+
25+
setup-gotools:
26+
go get -u github.com/golang/lint/golint
27+
go get -u golang.org/x/tools/cmd/cover
28+
go get -u golang.org/x/tools/cmd/vet
29+
30+
test: test-style test-unit
31+
32+
test-style:
33+
# display output, then check
34+
$(GOFMT) $(GO_PACKAGES) $(GO_FILES)
35+
@$(GOFMT) $(GO_PACKAGES) $(GO_FILES) | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi
36+
$(GOVET) $(repo_path) $(GO_PACKAGES_REPO_PATH)
37+
$(GOLINT) ./...
3638

3739
test-unit:
38-
@echo no unit tests
40+
$(GOTEST) ./...
File renamed without changes.

client/README.rst

Lines changed: 0 additions & 163 deletions
This file was deleted.

client/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)