1
0
mirror of https://github.com/jakeswenson/BitBetter.git synced 2023-10-10 13:36:57 +02:00
BitBetter/build.sh

24 lines
672 B
Bash
Raw Normal View History

2017-10-22 19:08:50 +02:00
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# If there aren't any keys, generate them first.
[ -e "$DIR/.keys/cert.cert" ] || "$DIR/.keys/generate-keys.sh"
[ -e "$DIR/src/bitBetter/api/.keys" ] || mkdir "$DIR/src/bitBetter/api/.keys"
[ -e "$DIR/src/bitBetter/identity/.keys" ] || mkdir "$DIR/src/bitBetter/identity/.keys"
2017-10-29 17:57:49 +01:00
cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/api/.keys"
cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/identity/.keys"
2017-10-29 17:57:49 +01:00
cd "$DIR/src/bitBetter"
2017-10-29 17:57:49 +01:00
2017-10-22 19:08:50 +02:00
dotnet restore
dotnet publish
2017-10-29 17:57:49 +01:00
cp -r ./bin ./api/
cp -r ./bin ./identity/
2017-10-29 17:57:49 +01:00
docker build -t bitbetter/api ./api # --squash
docker build -t bitbetter/identity ./identity # --squash