#!/bin/sh set -eu if [ $# -ne 0 ]; then echo "no arguments allowed for $(basename $0), given: $@" >&2 exit 64 fi . bin/_docker.sh . bin/_tag.sh dockerfile=cli/Dockerfile-bin validate_go_deps_tag $dockerfile ( bin/docker-build-base bin/docker-build-go-deps ) >/dev/null docker_build cli-bin $(head_root_tag) $dockerfile IMG=$(docker_repo cli-bin):$(head_root_tag) ID=$(docker create "$IMG") # copy the newly built conduit cli binaries to the local system for OS in darwin linux windows ; do DIR="target/cli/${OS}" mkdir -p "$DIR" if docker cp "$ID:/out/conduit-${OS}" "$DIR/conduit" ; then echo "$DIR/conduit" else docker rm "$ID" >/dev/null exit 1 fi done docker rm "$ID" >/dev/null