Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
526f27a
Reorganized project structure (#80)
moul Aug 6, 2015
e07a1fb
Refactored ps command (#80)
moul Aug 6, 2015
95165d0
Refactored 'exec' command (#80)
moul Aug 6, 2015
fea23f5
Refactored 'commit' command (#80)
moul Aug 6, 2015
712735a
Refactored 'attach' command (#80)
moul Aug 6, 2015
7bc8e27
Refactored 'events' command (#80)
moul Aug 6, 2015
889c9c0
Refactored 'login' command (#80)
moul Aug 6, 2015
d3b55c1
Splitted out code between cli and commands (#80)
moul Aug 6, 2015
add74e6
Refactored 'cp' command (#80)
moul Aug 6, 2015
7aa7feb
Refactored 'create' command (#80)
moul Aug 6, 2015
2e40afc
Refactored 'help' command (#80)
moul Aug 6, 2015
2f80f5e
Refactored 'history' command (#80)
moul Aug 6, 2015
d7c2b28
Refactored 'images' command (#80)
moul Aug 6, 2015
864ee31
Refactored 'info' command (#80)
moul Aug 6, 2015
c3fa4e1
Refactored 'inspect' command (#80)
moul Aug 6, 2015
bc6d794
Refactored 'kill' command (#80)
moul Aug 6, 2015
91617d1
party -c -d=vendor
moul Aug 6, 2015
9ea9db3
Refactored 'logout' command (#80)
moul Aug 6, 2015
9c75b4b
Refactored 'logs' command (#80)
moul Aug 6, 2015
e94726c
Refactored 'port' command (#80)
moul Aug 6, 2015
0cb2509
Refactored 'rename' command (#80)
moul Aug 6, 2015
7255efb
Refactored 'restart' command (#80)
moul Aug 6, 2015
09b1e57
Refactored 'rm' command (#80)
moul Aug 6, 2015
ca2ae82
Refactored 'top' command (#80)
moul Aug 7, 2015
617ee4a
Refactored 'rmi' command (#80)
moul Aug 7, 2015
f11348e
Refactored 'wait' command (#80)
moul Aug 7, 2015
b1429dc
Refactored 'run' command (#80)
moul Aug 7, 2015
cac92ab
Refactored 'tag' command (#80)
moul Aug 7, 2015
fd6ad5b
Refactored 'search' command (#80)
moul Aug 7, 2015
46ba016
Refactored 'start' command (#80)
moul Aug 7, 2015
379d0ce
Updated CHANGELOG
moul Aug 7, 2015
317448a
Refactored 'stop' command (#80)
moul Aug 7, 2015
09e7628
Refactored 'version' command (#80)
moul Aug 7, 2015
2b45f0a
Updated CHANGELOG
moul Aug 7, 2015
a1f0062
Switching to logrus
moul Aug 7, 2015
6893505
Using streams from context, removed os.Exits
moul Aug 7, 2015
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# builds
/scaleway-cli
/scw
scwversion/version.go
pkg/scwversion/version.go
dist/

# junk
*~
*#
.#*
profile.cov
profile.out
.vendor
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ FPM_ARGS ?= \


NAME = scw
SRC = .
PACKAGES = api commands utils
SRC = cmd/scw
PACKAGES = pkg/api pkg/commands pkg/utils pkg/cli
REV = $(shell git rev-parse HEAD || echo "nogit")
TAG = $(shell git describe --tags --always || echo "nogit")
BUILDER = scaleway-cli-builder
Expand All @@ -43,7 +43,7 @@ COVER_LIST = $(foreach int, $(PACKAGES), $(int)_cover)


all: build
build: scwversion/version.go $(BUILD_LIST)
build: pkg/scwversion/version.go $(BUILD_LIST)
clean: $(CLEAN_LIST)
install: $(INSTALL_LIST)
test: $(TEST_LIST)
Expand All @@ -59,8 +59,8 @@ cover:
touch $@


scwversion/version.go: .git
@sed 's/\(.*GITCOMMIT.* = \).*/\1"$(REV)"/;s/\(.*VERSION.* = \).*/\1"$(TAG)"/' scwversion/version.tpl > $@.tmp
pkg/scwversion/version.go: .git
@sed 's/\(.*GITCOMMIT.* = \).*/\1"$(REV)"/;s/\(.*VERSION.* = \).*/\1"$(TAG)"/' pkg/scwversion/version.tpl > $@.tmp
@if [ "$$(diff $@.tmp $@ 2>&1)" != "" ]; then mv $@.tmp $@; fi
@rm -f $@.tmp

Expand All @@ -72,7 +72,7 @@ $(CLEAN_LIST): %_clean:
$(GOCLEAN) ./$*
$(INSTALL_LIST): %_install:
$(GOINSTALL) ./$*
$(IREF_LIST): %_iref: scwversion/version.go
$(IREF_LIST): %_iref: pkg/scwversion/version.go
$(GOTEST) -i ./$*
$(TEST_LIST): %_test:
$(GOTEST) ./$*
Expand All @@ -83,7 +83,7 @@ $(FMT_LIST): %_fmt:
$(GOFMT) ./$*


cross: scwversion/version.go
cross: pkg/scwversion/version.go
docker build -t $(BUILDER) .
@docker rm scaleway-cli-builer 2>/dev/null || true
mkdir -p dist
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ chmod +x /usr/local/bin/scw
To install Scaleway CLI master git, run the following command:

```bash
go get github.com/scaleway/scaleway-cli
go get github.com/scaleway/scaleway-cli/...
```

### Requirements
Expand Down Expand Up @@ -106,7 +106,7 @@ $ docker run -it --rm --volume=$HOME/.scwrc:/.scwrc scaleway/cli ps
2. Ensure you have `$GOPATH` and `$PATH` well configured, something like:
* `export GOPATH=$HOME/go`
* `export PATH=$PATH:$GOPATH/bin`
3. Install the project: `go get github.com/scaleway/scaleway-cli`
3. Install the project: `go get github.com/scaleway/scaleway-cli/...`
4. Run: `scaleway-cli`

## Usage
Expand Down Expand Up @@ -1050,6 +1050,8 @@ $ scw inspect myserver | jq '.[0].public_ip.address'

#### Fixes

* Global refactor to improve Golang library usage, allow chaining of commands and ease the writing of unit tests ([#80](https://github.com/scaleway/scaleway-cli/issues/80))
* `scw search TERM` was not restricting results based on `TERM`
* Bumped dependencies
* Hiding more sensitive data ([#77](https://github.com/scaleway/scaleway-cli/issues/77))
* Fixed "Run in Docker" usage ([#90](https://github.com/scaleway/scaleway-cli/issues/90))
Expand Down Expand Up @@ -1230,7 +1232,7 @@ Feel free to contribute :smiley::beers:
2. Ensure you have `$GOPATH` and `$PATH` well configured, something like:
* `export GOPATH=$HOME/go`
* `export PATH=$PATH:$GOPATH/bin`
3. Fetch the project: `go get -d github.com/scaleway/scaleway-cli`
3. Fetch the project: `go get -d github.com/scaleway/scaleway-cli/...`
4. Go to scaleway-cli directory: `cd $GOPATH/src/github.com/scaleway/scaleway-cli`
5. Hack: `emacs`
6. Build: `make`
Expand Down
8 changes: 4 additions & 4 deletions main.go → cmd/scw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
log "github.com/scaleway/scaleway-cli/vendor/github.com/Sirupsen/logrus"
flag "github.com/scaleway/scaleway-cli/vendor/github.com/docker/docker/pkg/mflag"

"github.com/scaleway/scaleway-cli/api"
cmds "github.com/scaleway/scaleway-cli/commands"
"github.com/scaleway/scaleway-cli/scwversion"
"github.com/scaleway/scaleway-cli/utils"
"github.com/scaleway/scaleway-cli/pkg/api"
cmds "github.com/scaleway/scaleway-cli/pkg/cli"
"github.com/scaleway/scaleway-cli/pkg/scwversion"
"github.com/scaleway/scaleway-cli/pkg/utils"
)

// CommandListOpts holds a list of parameters
Expand Down
61 changes: 0 additions & 61 deletions commands/events.go

This file was deleted.

73 changes: 0 additions & 73 deletions commands/history.go

This file was deleted.

62 changes: 0 additions & 62 deletions commands/info.go

This file was deleted.

Loading