forked from qwc-services/qwc-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-services.sh
executable file
·28 lines (23 loc) · 1.03 KB
/
build-services.sh
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
#!/bin/bash
set -e
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
containers="qwc-admin-gui qwc-config-service qwc-data-service qwc-map-viewer qwc-ogc-service qwc-registration-gui"
declare -A git_versions
for ctr in $containers; do
printf "${YELLOW}${ctr}${NC}\n\n"
git_version=$(git ls-remote https://github.com/qwc-services/$ctr HEAD | cut -f 1)
git_versions[$ctr]=$git_version
docker-compose build --build-arg GIT_VERSION=$git_version $ctr
printf "\n================================================================================\n"
done
printf "${YELLOW}qwc-auth-service${NC}\n\n"
AUTH_SERVICE=qwc-db-auth
git_version=$(git ls-remote https://github.com/qwc-services/$AUTH_SERVICE HEAD | cut -f 1)
git_versions['qwc-auth-service']=$git_version
docker-compose build --build-arg GIT_VERSION=$git_version qwc-auth-service
printf "\n================================================================================\n"
printf "\nUpdated containers:\n\n"
for ctr in ${!git_versions[@]}; do
printf "${git_versions[$ctr]} ${YELLOW}$ctr${NC}\n"
done