Skip to content

Commit f6ba583

Browse files
committed
Call update.py only once
This resolves #167 (comment).
1 parent 3c699a3 commit f6ba583

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

build.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@
33
set -e
44

55
IMAGE=wiktorn/overpass-api
6+
VERSIONS=$(python update.py)
67

78
case "$1" in
89
"build")
9-
versions=$(python update.py)
10-
11-
for version in $versions; do
10+
for version in $VERSIONS; do
1211
docker build --build-arg "OVERPASS_VERSION=${version}" -t "${IMAGE}:${version}" .
1312
done
1413

15-
latest=$(echo "$versions" | sort -V | tail -n 1)
14+
latest=$(echo "$VERSIONS" | sort -V | tail -n 1)
1615
docker tag "${IMAGE}:${latest}" "${IMAGE}:latest"
1716
;;
1817

1918
"push")
20-
versions=$(python update.py)
21-
22-
for version in $versions; do
19+
for version in $VERSIONS; do
2320
docker push "${IMAGE}:${version}"
2421
done
2522
docker push "${IMAGE}:latest"

0 commit comments

Comments
 (0)