Browse Source

feat(build): add initial build script

add a simple build script that sets up a gopath and uses the current git
directory for the github.com/coreos/etcd packages.

There aren't a lot of great alternatives to doing it this way unless we
want to check in all of the dependencies into the repo (which is
actually a good practice probably).
Brandon Philips 12 years ago
parent
commit
1eb0be10fe
2 changed files with 20 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 18 0
      build

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+src
+etcd

+ 18 - 0
build

@@ -0,0 +1,18 @@
+#!/bin/sh
+
+ETCD_PACKAGE=github.com/coreos/etcd
+GOPATH=${PWD}
+SRC_DIR=$GOPATH/src
+ETCD_DIR=$SRC_DIR/$ETCD_PACKAGE
+
+ETCD_BASE=$(dirname ${ETCD_DIR})
+if [ ! -d ${ETCD_BASE} ]; then
+	mkdir -p ${ETCD_BASE}
+fi
+
+if [ ! -h ${ETCD_DIR} ]; then
+	ln -s ../../../ ${ETCD_DIR}
+fi
+
+go get -d ./...
+go build ${ETCD_PACKAGE}