#!/bin/sh

if [ -z "$1" ]; then
  echo "You must specify the project to build and distribute (ex. path/to/build-docker.sh Twitch.Sage.Web)"
  exit 1
fi

rm -rf $PWD/dist

docker build -t csi-service-build -f dotnetcore-ci/docker/Dockerfile-build . --build-arg PROJECT=$1
docker run --rm --volume=$PWD/dist:/dist csi-service-build
docker build -t csi-service-dist -f dotnetcore-ci/docker/Dockerfile-dist . --build-arg PROJECT=$1
