1
0
mirror of https://github.com/rancher/os.git synced 2025-07-15 15:51:36 +00:00
os/scripts/mk-ros.sh
2016-03-14 12:08:11 -07:00

14 lines
354 B
Bash
Executable File

#!/bin/bash
set -ex
ros="$1"
ARCH=${ARCH:?"ARCH not set"}
VERSION=${VERSION:?"VERSION not set"}
cd $(dirname $0)/..
[ "${ARCH}" == "arm" ] && export GOARM=6
GOARCH=${ARCH} go build -tags netgo -installsuffix netgo -ldflags "-X github.com/rancher/os/config.VERSION=${VERSION} -linkmode external -extldflags -static" -o ${ros}
strip --strip-all ${ros}