Skip to content

Commit

Permalink
feat(scripts): add build-release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Philips committed Oct 10, 2013
1 parent 8ebbb96 commit 45f0ff5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions scripts/build-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh -e

VER=$1

function build {
proj=${1}
ver=${2}

if [ ! -d ${proj} ]; then
git clone https://github.com/coreos/${proj}
fi

cd ${proj}
git checkout master
git fetch --all
git reset --hard origin/master
git checkout $ver
./build
cd -
}

function package {
proj=${1}
target=${2}

cp ${proj}/${proj} ${target}
cp ${proj}/README.md ${target}/README-${proj}.md
}

build etcd ${VER}
build etcdctl ${VER}

TARGET="etcd-$VER-$(uname -s)-$(uname -m)"
mkdir ${TARGET}

package etcd ${TARGET}
package etcdctl ${TARGET}

tar cvvfz ${TARGET}.tar.gz ${TARGET}

0 comments on commit 45f0ff5

Please sign in to comment.