The package building scripts autodetect the correct Go version to
[arvados.git] / build / package-build-dockerfiles / build-all-build-containers.sh
1 #!/bin/bash
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 make
7
8 GOVERSION=$(grep 'const goversion =' ../../lib/install/deps.go |awk -F'"' '{print $2}')
9
10 for target in `find -maxdepth 1 -type d |grep -v generated`; do
11   if [[ "$target" == "." ]]; then
12     continue
13   fi
14   target=${target#./}
15   echo $target
16   cd $target
17   docker build --tag arvados/build:$target \
18     --build-arg HOSTTYPE=$HOSTTYPE \
19     --build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
20     --build-arg GOVERSION=$GOVERSION --no-cache .
21   cd ..
22 done