mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

This will generate the version based on git tags. So if it is built directly on a tag it will use the tag name and if it is built off a commit that isn't a tag it will look like: $ curl localhost:7001 0-267-ga39cf1c
26 lines
449 B
Bash
Executable File
26 lines
449 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ETCD_PACKAGE=github.com/coreos/etcd
|
|
export 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
|
|
|
|
for i in third_party/*; do
|
|
if [ $i = "third_party/src" ]; then
|
|
continue
|
|
fi
|
|
cp -R $i src/
|
|
done
|
|
|
|
./scripts/release-version > release_version.go
|
|
go build ${ETCD_PACKAGE}
|