Browse Source

build: support go install github.com/coreos/etcd/cmd/etcd

Could build via github.com/coreos/etcd/cmd but that would generate a binary
named "cmd", which is not ideal.
Anthony Romano 9 years ago
parent
commit
449923c98b
7 changed files with 21 additions and 5 deletions
  1. 1 1
      .travis.yml
  2. 1 1
      build
  3. 1 1
      build.ps1
  4. 17 0
      client/integration/doc.go
  5. 1 0
      cmd/etcd
  6. 0 1
      cmd/etcdmain
  7. 0 1
      cmd/main.go

+ 1 - 1
.travis.yml

@@ -42,7 +42,7 @@ before_install:
 
 
 # disable godep restore override
 # disable godep restore override
 install:
 install:
- - pushd cmd/ && go get -t -v ./... && popd
+ - pushd cmd/etcd && go get -t -v ./... && popd
 
 
 script:
 script:
  - >
  - >

+ 1 - 1
build

@@ -34,7 +34,7 @@ etcd_build() {
 	if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi
 	if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi
 	toggle_failpoints
 	toggle_failpoints
 	# Static compilation is useful when etcd is run in a container
 	# Static compilation is useful when etcd is run in a container
-	CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=${GIT_SHA}" -o ${out}/etcd ${REPO_PATH}/cmd
+	CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=${GIT_SHA}" -o ${out}/etcd ${REPO_PATH}/cmd/etcd
 	CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s" -o ${out}/etcdctl ${REPO_PATH}/cmd/etcdctl
 	CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s" -o ${out}/etcdctl ${REPO_PATH}/cmd/etcdctl
 }
 }
 
 

+ 1 - 1
build.ps1

@@ -41,5 +41,5 @@ if (-not $env:GOPATH) {
 $env:CGO_ENABLED = 0
 $env:CGO_ENABLED = 0
 $env:GO15VENDOREXPERIMENT = 1
 $env:GO15VENDOREXPERIMENT = 1
 $GIT_SHA="$(git rev-parse --short HEAD)"
 $GIT_SHA="$(git rev-parse --short HEAD)"
-go build -a -installsuffix cgo -ldflags "-s -X $REPO_PATH/cmd/vendor/$REPO_PATH/version.GitSHA=$GIT_SHA" -o bin\etcd.exe "$REPO_PATH\cmd"
+go build -a -installsuffix cgo -ldflags "-s -X $REPO_PATH/cmd/vendor/$REPO_PATH/version.GitSHA=$GIT_SHA" -o bin\etcd.exe "$REPO_PATH\cmd\etcd"
 go build -a -installsuffix cgo -ldflags "-s" -o bin\etcdctl.exe "$REPO_PATH\cmd\etcdctl"
 go build -a -installsuffix cgo -ldflags "-s" -o bin\etcdctl.exe "$REPO_PATH\cmd\etcdctl"

+ 17 - 0
client/integration/doc.go

@@ -0,0 +1,17 @@
+// Copyright 2016 The etcd Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package integration implements tests built upon embedded etcd, focusing on
+// the correctness of the etcd v2 client.
+package integration

+ 1 - 0
cmd/etcd

@@ -0,0 +1 @@
+../

+ 0 - 1
cmd/etcdmain

@@ -1 +0,0 @@
-../etcdmain

+ 0 - 1
cmd/main.go

@@ -1 +0,0 @@
-../main.go