Browse Source

Merge pull request #1107 from bcwaldon/Procfile

Isolate ./build from environment
Brandon Philips 11 years ago
parent
commit
da9956df11
2 changed files with 9 additions and 19 deletions
  1. 4 4
      Procfile
  2. 5 15
      build

+ 4 - 4
Procfile

@@ -1,5 +1,5 @@
 # Use goreman to run `go get github.com/mattn/goreman`
-etcd1: ./etcd -id 0x1 -bind-addr 127.0.0.1:4001 -peer-bind-addr :7001 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
-etcd2: ./etcd -id 0x2 -bind-addr 127.0.0.1:4002 -peer-bind-addr :7002 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
-etcd3: ./etcd -id 0x3 -bind-addr 127.0.0.1:4003 -peer-bind-addr :7003 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
-proxy: ./etcd -proxy=on -bind-addr 127.0.0.1:8080 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
+etcd1: bin/etcd -id 0x1 -bind-addr 127.0.0.1:4001 -peer-bind-addr :7001 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
+etcd2: bin/etcd -id 0x2 -bind-addr 127.0.0.1:4002 -peer-bind-addr :7002 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
+etcd3: bin/etcd -id 0x3 -bind-addr 127.0.0.1:4003 -peer-bind-addr :7003 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'
+proxy: bin/etcd -proxy=on -bind-addr 127.0.0.1:8080 -peers '0x1=localhost:7001&0x2=localhost:7002&0x3=localhost:7003'

+ 5 - 15
build

@@ -3,22 +3,12 @@
 ORG_PATH="github.com/coreos"
 REPO_PATH="${ORG_PATH}/etcd"
 
-# If the user hasn't set up a GOPATH, make one for them
-if [[ -z "$GOPATH" ]]; then 
-	GOPATH=${PWD}/gopath
-	if [ ! -h gopath/src/${REPO_PATH} ]; then
-		mkdir -p gopath/src/${ORG_PATH}
-		ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
-	fi
-	# Similarly, set up GOBIN if not already set
-	if [[ -z "$GOBIN" ]]; then 
-		GOBIN=${PWD}/bin
-	fi
-fi
+export GOPATH=${PWD}/gopath
 
-export GOPATH=$GOPATH
-export GOBIN=$GOBIN
+rm -f $GOPATH/src/${REPO_PATH}
+mkdir -p $GOPATH/src/${ORG_PATH}
+ln -s ${PWD} $GOPATH/src/${REPO_PATH}
 
 eval $(go env)
 
-go install ${REPO_PATH}
+go build -o bin/etcd ${REPO_PATH}