1
0
mirror of https://github.com/rancher/os.git synced 2025-06-29 16:26:50 +00:00
os/config/cloudinit/build

18 lines
435 B
Plaintext
Raw Normal View History

2015-11-26 12:37:01 +00:00
#!/bin/bash -e
2015-12-18 05:43:56 +00:00
NAME="coreos-cloudinit"
2015-11-26 12:37:01 +00:00
ORG_PATH="github.com/coreos"
2015-12-18 05:43:56 +00:00
REPO_PATH="${ORG_PATH}/${NAME}"
VERSION=$(git describe --dirty --tags)
GLDFLAGS="-X main.version=\"${VERSION}\""
2015-11-26 12:37:01 +00:00
if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi
export GOBIN=${PWD}/bin
export GOPATH=${PWD}/gopath
2015-12-18 05:43:56 +00:00
go build -ldflags "${GLDFLAGS}" -o ${GOBIN}/${NAME} ${REPO_PATH}