feat(third_party): use this directory

The third_party directory has all of the dependencies needed to build
etcd so that we can have a consistent build. `go get` should not be
called at any point during the build process.
This commit is contained in:
Brandon Philips 2013-08-06 11:19:19 -07:00
parent a585f5fc2e
commit 5f6d331e6a
4 changed files with 25 additions and 4 deletions

10
build
View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
ETCD_PACKAGE=github.com/coreos/etcd
export GOPATH=${PWD}
@ -14,5 +14,11 @@ if [ ! -h ${ETCD_DIR} ]; then
ln -s ../../../ ${ETCD_DIR}
fi
go get -d ./...
for i in third_party/*; do
if [ $i = "third_party/src" ]; then
continue
fi
cp -R $i src/
done
go build ${ETCD_PACKAGE}

View File

@ -1 +1 @@
src
src/

11
third_party/README vendored Normal file
View File

@ -0,0 +1,11 @@
# Third Party Libraries
The third_party directory has all of the dependencies needed to build
etcd so that we can have a consistent build. `go get` should not be
called at any point during the build process.
## Usage
To update all of the third party libraries call
./update

6
third_party/update vendored
View File

@ -2,7 +2,10 @@
packages="
github.com/coreos/go-raft
github.com/coreos/go-etcd
github.com/benbjohnson/go-raft
github.com/ccding/go-logging
github.com/ccding/go-config-reader
bitbucket.org/kardianos/osext
code.google.com/p/go.net
code.google.com/p/goprotobuf
@ -20,6 +23,7 @@ for p in $packages; do
# The go get path
gp=src/$p
# Attempt to find the commit hash of the repo
HEAD=
if [ -d $gp/.git ]; then
# Grab the head if it is git
@ -36,7 +40,7 @@ for p in $packages; do
# Copy the code into the final directory
rsync -a -z -r --exclude '.git/' --exclude '.hg/' src/$p/ $p
# Make a nice commit about what everything bumped to
git add $p
git commit -m "bump($p): $HEAD"
done