1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
bitwarden-server/build-ci.sh

44 lines
857 B
Bash
Raw Normal View History

2019-03-08 20:16:44 +01:00
#!/usr/bin/env bash
set -e
echo "Repo tag name: ${APPVEYOR_REPO_TAG_NAME}"
echo "Rebuild: ${APPVEYOR_RE_BUILD}"
PROD_DEPLOY=false
TAG_NAME=""
2019-03-08 20:47:56 +01:00
if [ "${APPVEYOR_REPO_TAG_NAME}" != "" -a "${APPVEYOR_RE_BUILD}" == "True" ]
2019-03-08 20:16:44 +01:00
then
PROD_DEPLOY=true
TAG_NAME=${APPVEYOR_REPO_TAG_NAME#"v"}
fi
2019-03-08 20:47:56 +01:00
echo "Prod deploy: ${PROD_DEPLOY}"
echo "Tag name: ${TAG_NAME}"
2019-03-08 20:16:44 +01:00
#dotnet build --configuration Debug
if [ "${DOCKER_USERNAME}" != "" -a "${DOCKER_PASSWORD}" != "" ]
then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
fi
chmod +x ./build.sh
2019-03-08 20:16:44 +01:00
./build.sh
./build.sh tag dev
2019-03-08 20:22:25 +01:00
if [ "${PROD_DEPLOY}" == "true" ]
2019-03-08 20:16:44 +01:00
then
./build.sh tag beta
./build.sh tag $TAG_NAME
fi
docker images
./build.sh push dev
2019-03-08 20:22:25 +01:00
if [ "${PROD_DEPLOY}" == "true" ]
2019-03-08 20:16:44 +01:00
then
./build.sh push beta
./build.sh push latest
./build.sh push $TAG_NAME
fi