Skip to content

Commit a5cf3e9

Browse files
committed
Make sure to only use first MINOR version occurence
1 parent 47a4fc9 commit a5cf3e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ for i in $HAPROXY_BRANCHES; do
1111
echo "Building HAProxy $i"
1212

1313
DOCKERFILE="$i/Dockerfile"
14-
HAPROXY_MINOR_OLD=$(awk '/^ENV HAPROXY_MINOR/ {print $NF}' "$DOCKERFILE")
15-
DATAPLANE_MINOR_OLD=$(awk '/^ENV DATAPLANE_MINOR/ {print $NF}' "$DOCKERFILE")
14+
HAPROXY_MINOR_OLD=$(awk '/^ENV HAPROXY_MINOR/ {print $NF; exit}' "$DOCKERFILE")
15+
DATAPLANE_MINOR_OLD=$(awk '/^ENV DATAPLANE_MINOR/ {print $NF; exit}' "$DOCKERFILE")
1616

1717
./update.sh "$i" || continue
1818

19-
HAPROXY_MINOR=$(awk '/^ENV HAPROXY_MINOR/ {print $NF}' "$DOCKERFILE")
20-
DATAPLANE_MINOR=$(awk '/^ENV DATAPLANE_MINOR/ {print $NF}' "$DOCKERFILE")
19+
HAPROXY_MINOR=$(awk '/^ENV HAPROXY_MINOR/ {print $NF; exit}' "$DOCKERFILE")
20+
DATAPLANE_MINOR=$(awk '/^ENV DATAPLANE_MINOR/ {print $NF; exit}' "$DOCKERFILE")
2121

2222
if [ "x$1" != "xforce" ]; then
2323
if [ \( "$HAPROXY_MINOR_OLD" = "$HAPROXY_MINOR" \) -a \( "$DATAPLANE_MINOR_OLD" = "$DATAPLANE_MINOR" \) ]; then
@@ -56,7 +56,7 @@ if [ "$PUSH" = "no" ]; then
5656
fi
5757

5858
echo -e "# Supported tags and respective \`Dockerfile\` links\n" > README.md
59-
for i in $(awk '/^ENV HAPROXY_MINOR/ {print $NF}' */Dockerfile| sort -n -r); do
59+
for i in $(awk '/^ENV HAPROXY_MINOR/ {print $NF; exit}' */Dockerfile| sort -n -r); do
6060
short=$(echo $i | cut -d. -f1-2 |cut -d- -f1)
6161
if [ "$short" = "$HAPROXY_CURRENT_BRANCH" ]; then
6262
if [ "$short" = "$i" ]; then

0 commit comments

Comments
 (0)