Skip to content

Commit 45f0ff5

Browse files
author
Brandon Philips
committed
feat(scripts): add build-release script
1 parent 8ebbb96 commit 45f0ff5

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

scripts/build-release

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/sh -e
2+
3+
VER=$1
4+
5+
function build {
6+
proj=${1}
7+
ver=${2}
8+
9+
if [ ! -d ${proj} ]; then
10+
git clone https://github.com/coreos/${proj}
11+
fi
12+
13+
cd ${proj}
14+
git checkout master
15+
git fetch --all
16+
git reset --hard origin/master
17+
git checkout $ver
18+
./build
19+
cd -
20+
}
21+
22+
function package {
23+
proj=${1}
24+
target=${2}
25+
26+
cp ${proj}/${proj} ${target}
27+
cp ${proj}/README.md ${target}/README-${proj}.md
28+
}
29+
30+
build etcd ${VER}
31+
build etcdctl ${VER}
32+
33+
TARGET="etcd-$VER-$(uname -s)-$(uname -m)"
34+
mkdir ${TARGET}
35+
36+
package etcd ${TARGET}
37+
package etcdctl ${TARGET}
38+
39+
tar cvvfz ${TARGET}.tar.gz ${TARGET}

0 commit comments

Comments
 (0)