Skip to content
This repository was archived by the owner on Jun 4, 2019. It is now read-only.

Commit e646586

Browse files
author
Brandon Philips
committed
chore(*): use goven for all dependencies
To ensure that etcdctl is always go gettable follow the lead of etcd and use goven for dependencies.
1 parent 507dbf1 commit e646586

Some content is hidden

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

89 files changed

+623
-5585
lines changed

.gitignore

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ _testmain.go
2121

2222
*.exe
2323

24-
src/
25-
pkg/
26-
/etcdctl
27-
release_version.go
24+
/src
25+
/pkg
26+
/bin

build

+7-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
#!/bin/bash
1+
#!/bin/sh -e
22

3-
ETCD_PACKAGE=github.com/coreos/etcdctl
4-
export GOPATH="${PWD}"
5-
SRC_DIR="$GOPATH/src"
6-
ETCD_DIR="$SRC_DIR/$ETCD_PACKAGE"
7-
8-
ETCD_BASE=$(dirname "${ETCD_DIR}")
9-
if [ ! -d "${ETCD_BASE}" ]; then
10-
mkdir -p "${ETCD_BASE}"
11-
fi
12-
13-
if [ ! -h "${ETCD_DIR}" ]; then
14-
ln -s ../../../ "${ETCD_DIR}"
3+
if [ ! -h src/github.com/coreos/etcdctl ]; then
4+
mkdir -p src/github.com/coreos/
5+
ln -s ../../.. src/github.com/coreos/etcdctl
156
fi
167

17-
for i in third_party/*; do
18-
if [ "$i" = "third_party/src" ]; then
19-
continue
20-
fi
21-
cp -R "$i" src/
22-
done
8+
export GOBIN=${PWD}/bin
9+
export GOPATH=${PWD}
2310

24-
./scripts/release-version > release_version.go
25-
go build "${ETCD_PACKAGE}"
11+
go install github.com/coreos/etcdctl

command/exec_watch_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import (
88
"os/exec"
99
"os/signal"
1010

11-
"github.com/codegangsta/cli"
12-
"github.com/coreos/go-etcd/etcd"
11+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
12+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
1313
)
1414

1515
// NewExecWatchCommand returns the CLI command for "exec-watch".
1616
func NewExecWatchCommand() cli.Command {
1717
return cli.Command{
18-
Name: "exec-watch",
19-
Usage: "watch a key for changes and exec an executable",
18+
Name: "exec-watch",
19+
Usage: "watch a key for changes and exec an executable",
2020
Flags: []cli.Flag{
21-
cli.IntFlag{"after-index", 0, "watch after the given index", false},
21+
cli.IntFlag{"after-index", 0, "watch after the given index"},
2222
cli.BoolFlag{"recursive", "watch all values for key and child keys"},
2323
},
2424
Action: func(c *cli.Context) {

command/get_command.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewGetCommand returns the CLI command for "get".
1111
func NewGetCommand() cli.Command {
1212
return cli.Command{
13-
Name: "get",
14-
Usage: "retrieve the value of a key",
13+
Name: "get",
14+
Usage: "retrieve the value of a key",
1515
Flags: []cli.Flag{
1616
cli.BoolFlag{"sort", "returns result in sorted order"},
1717
cli.BoolFlag{"consistent", "send request to the leader, thereby guranteeing that any earlier writes will be seen by the read"},

command/handle.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"os"
77
"strings"
88

9-
"github.com/codegangsta/cli"
10-
"github.com/coreos/go-etcd/etcd"
9+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
10+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
1111
)
1212

1313
type handlerFunc func(*cli.Context, *etcd.Client) (*etcd.Response, error)

command/ls_command.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package command
33
import (
44
"fmt"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
func NewLsCommand() cli.Command {
1111
return cli.Command{
12-
Name: "ls",
13-
Usage: "retrieve a directory",
12+
Name: "ls",
13+
Usage: "retrieve a directory",
1414
Flags: []cli.Flag{
1515
cli.BoolFlag{"recursive", "returns all values for key and child keys"},
1616
},

command/mk_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewMakeCommand returns the CLI command for "mk".
1111
func NewMakeCommand() cli.Command {
1212
return cli.Command{
13-
Name: "mk",
14-
Usage: "make a new key with a given value",
13+
Name: "mk",
14+
Usage: "make a new key with a given value",
1515
Flags: []cli.Flag{
16-
cli.IntFlag{"ttl", 0, "key time-to-live", false},
16+
cli.IntFlag{"ttl", 0, "key time-to-live"},
1717
},
1818
Action: func(c *cli.Context) {
1919
handleKey(c, makeCommandFunc)

command/mkdir_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewMakeDirCommand returns the CLI command for "mkdir".
1111
func NewMakeDirCommand() cli.Command {
1212
return cli.Command{
13-
Name: "mkdir",
14-
Usage: "make a new directory",
13+
Name: "mkdir",
14+
Usage: "make a new directory",
1515
Flags: []cli.Flag{
16-
cli.IntFlag{"ttl", 0, "key time-to-live", false},
16+
cli.IntFlag{"ttl", 0, "key time-to-live"},
1717
},
1818
Action: func(c *cli.Context) {
1919
handleKey(c, makeDirCommandFunc)

command/rm_command.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewRemoveCommand returns the CLI command for "rm".
1111
func NewRemoveCommand() cli.Command {
1212
return cli.Command{
13-
Name: "rm",
14-
Usage: "remove a key",
13+
Name: "rm",
14+
Usage: "remove a key",
1515
Flags: []cli.Flag{
1616
cli.BoolFlag{"dir", "removes the key if it is an empty directory or a key-value pair"},
1717
cli.BoolFlag{"recursive", "removes the key and all child keys(if it is a directory)"},

command/rmdir_command.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewRemoveCommand returns the CLI command for "rmdir".
1111
func NewRemoveDirCommand() cli.Command {
1212
return cli.Command{
13-
Name: "rmdir",
14-
Usage: "removes the key if it is an empty directory or a key-value pair",
13+
Name: "rmdir",
14+
Usage: "removes the key if it is an empty directory or a key-value pair",
1515
Action: func(c *cli.Context) {
1616
handleKey(c, removeDirCommandFunc)
1717
},

command/set_command.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewSetCommand returns the CLI command for "set".
1111
func NewSetCommand() cli.Command {
1212
return cli.Command{
13-
Name: "set",
14-
Usage: "set the value of a key",
13+
Name: "set",
14+
Usage: "set the value of a key",
1515
Flags: []cli.Flag{
16-
cli.IntFlag{"ttl", 0, "key time-to-live", false},
17-
cli.StringFlag{"swap-with-value", "", "previous value", false},
18-
cli.IntFlag{"swap-with-index", 0, "previous index", false},
16+
cli.IntFlag{"ttl", 0, "key time-to-live"},
17+
cli.StringFlag{"swap-with-value", "", "previous value"},
18+
cli.IntFlag{"swap-with-index", 0, "previous index"},
1919
},
2020
Action: func(c *cli.Context) {
2121
handleKey(c, setCommandFunc)

command/set_dir_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewSetDirCommand returns the CLI command for "setDir".
1111
func NewSetDirCommand() cli.Command {
1212
return cli.Command{
13-
Name: "setdir",
14-
Usage: "create a new or existing directory",
13+
Name: "setdir",
14+
Usage: "create a new or existing directory",
1515
Flags: []cli.Flag{
16-
cli.IntFlag{"ttl", 0, "key time-to-live", false},
16+
cli.IntFlag{"ttl", 0, "key time-to-live"},
1717
},
1818
Action: func(c *cli.Context) {
1919
handleKey(c, setDirCommandFunc)

command/update_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewUpdateCommand returns the CLI command for "update".
1111
func NewUpdateCommand() cli.Command {
1212
return cli.Command{
13-
Name: "update",
14-
Usage: "update an existing key with a given value",
13+
Name: "update",
14+
Usage: "update an existing key with a given value",
1515
Flags: []cli.Flag{
16-
cli.IntFlag{"ttl", 0, "key time-to-live", false},
16+
cli.IntFlag{"ttl", 0, "key time-to-live"},
1717
},
1818
Action: func(c *cli.Context) {
1919
handleKey(c, updateCommandFunc)

command/update_dir_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package command
33
import (
44
"errors"
55

6-
"github.com/codegangsta/cli"
7-
"github.com/coreos/go-etcd/etcd"
6+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
7+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
88
)
99

1010
// NewUpdateDirCommand returns the CLI command for "updateDir".
1111
func NewUpdateDirCommand() cli.Command {
1212
return cli.Command{
13-
Name: "updatedir",
14-
Usage: "update an existing directory",
13+
Name: "updatedir",
14+
Usage: "update an existing directory",
1515
Flags: []cli.Flag{
16-
cli.IntFlag{"ttl", 0, "key time-to-live", false},
16+
cli.IntFlag{"ttl", 0, "key time-to-live"},
1717
},
1818
Action: func(c *cli.Context) {
1919
handleKey(c, updateDirCommandFunc)

command/watch_command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ import (
66
"os"
77
"os/signal"
88

9-
"github.com/codegangsta/cli"
10-
"github.com/coreos/go-etcd/etcd"
9+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
10+
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
1111
)
1212

1313
// NewWatchCommand returns the CLI command for "watch".
1414
func NewWatchCommand() cli.Command {
1515
return cli.Command{
16-
Name: "watch",
17-
Usage: "watch a key for changes",
16+
Name: "watch",
17+
Usage: "watch a key for changes",
1818
Flags: []cli.Flag{
1919
cli.BoolFlag{"forever", "forever watch a key until CTRL+C"},
20-
cli.IntFlag{"after-index", 0, "watch after the given index", false},
20+
cli.IntFlag{"after-index", 0, "watch after the given index"},
2121
cli.BoolFlag{"recursive", "returns all values for key and child keys"},
2222
},
2323
Action: func(c *cli.Context) {

etcdctl.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package main
33
import (
44
"os"
55

6-
"github.com/codegangsta/cli"
76
"github.com/coreos/etcdctl/command"
7+
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
88
)
99

1010
func main() {
@@ -14,8 +14,8 @@ func main() {
1414
app.Usage = "A simple command line client for etcd."
1515
app.Flags = []cli.Flag{
1616
cli.BoolFlag{"debug", "output cURL commands which can be used to reproduce the request"},
17-
cli.StringFlag{"output, o", "simple", "output response in the given format (`simple` or `json`)", false},
18-
cli.StringFlag{"peers, C", "127.0.0.1:4001", "a comma seperated list of machine addresses in the cluster", false},
17+
cli.StringFlag{"output, o", "simple", "output response in the given format (`simple` or `json`)"},
18+
cli.StringFlag{"peers, C", "127.0.0.1:4001", "a comma seperated list of machine addresses in the cluster"},
1919
}
2020
app.Commands = []cli.Command{
2121
command.NewMakeCommand(),

release_version.go

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package main
2+
3+
const releaseVersion = "v0.2.0-git"

third_party/.gitignore

-1
This file was deleted.

third_party/bitbucket.org/kardianos/osext/LICENSE

-20
This file was deleted.

0 commit comments

Comments
 (0)