forked from CryptoverseCC/cryptoverse-login
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-build
More file actions
executable file
·37 lines (29 loc) · 808 Bytes
/
docker-build
File metadata and controls
executable file
·37 lines (29 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -e
set -o xtrace
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
source .env
(
LAST_VERSION=$(cat .last_build)
if [ ! -z "$1" ]; then
export TAG="$1"
else
# $ cargo install semver-cli
TAG=$(semver-cli "$LAST_VERSION" --increment)
export TAG
fi
if [ ! -z "$2" ]; then
export MESSAGE="$2"
git add .
fi
docker-compose -f docker-compose.build.yml build --pull #--parallel
docker-compose -f docker-compose.build.yml push
if [ ! -z "$MESSAGE" ]; then
git commit -m "$2"
git tag "$PROJECT-$TAG"
fi
echo "$TAG" >.last_build
sed -i "s/version: ${LAST_VERSION}/version: ${TAG}/g" charts/login/values.yaml
sed -i "s/${LAST_VERSION}/${TAG}/g" charts/login/Chart.yaml
)