1
0
mirror of https://github.com/rancher/types.git synced 2025-06-30 15:31:48 +00:00
types/scripts/package

25 lines
388 B
Plaintext
Raw Normal View History

2017-11-10 20:23:15 +00:00
#!/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/types .
IMAGE=${REPO}/types:${TAG}
docker build -t ${IMAGE} .
echo ${IMAGE} > ../dist/images
echo Built ${IMAGE}