1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00
bitwarden/src/Api/build.sh
2018-08-01 10:07:20 -04:00

20 lines
685 B
Bash
Executable File

#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo -e "\n## Building API"
echo -e "\nBuilding app"
echo ".NET Core version $(dotnet --version)"
echo "Clean"
dotnet clean $DIR/Api.csproj -f netcoreapp2.1 -c "Release" -o $DIR/obj/Docker/publish/Api
dotnet clean $DIR/../Jobs/Jobs.csproj -f netcoreapp2.1 -c "Release" -o $DIR/obj/Docker/publish/Jobs
echo "Publish"
dotnet publish $DIR/Api.csproj -f netcoreapp2.1 -c "Release" -o $DIR/obj/Docker/publish/Api
dotnet publish $DIR/../Jobs/Jobs.csproj -f netcoreapp2.1 -c "Release" -o $DIR/obj/Docker/publish/Jobs
echo -e "\nBuilding docker image"
docker --version
docker build -t bitwarden/api $DIR/.