Browse Source

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.
Brandon Philips 12 years ago
parent
commit
5f6d331e6a
4 changed files with 25 additions and 4 deletions
  1. 8 2
      build
  2. 1 1
      third_party/.gitignore
  3. 11 0
      third_party/README
  4. 5 1
      third_party/update

+ 8 - 2
build

@@ -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}

+ 1 - 1
third_party/.gitignore

@@ -1 +1 @@
-src
+src/

+ 11 - 0
third_party/README

@@ -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

+ 5 - 1
third_party/update

@@ -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