1
0
mirror of https://github.com/rancher/norman.git synced 2025-04-27 19:15:07 +00:00
norman/scripts/package
2017-10-11 22:48:07 -07:00

25 lines
390 B
Bash
Executable File

#!/bin/bash
set -e
source $(dirname $0)/version
ARCH=${ARCH:-"amd64"}
SUFFIX=""
[ "${ARCH}" != "amd64" ] && SUFFIX="_${ARCH}"
cd $(dirname $0)/../package
TAG=${TAG:-${VERSION}${SUFFIX}}
REPO=${REPO:-rancher}
if echo $TAG | grep -q dirty; then
TAG=dev
fi
cp ../bin/norman .
IMAGE=${REPO}/norman:${TAG}
docker build -t ${IMAGE} .
echo ${IMAGE} > ../dist/images
echo Built ${IMAGE}