File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -47,19 +47,26 @@ if [ -z "${HAPROXY_SHA256}" ]; then
4747 exit 1
4848fi
4949
50- DATAPLANE_SRC_URL=" https://api.github.com/repos/haproxytech/dataplaneapi/releases/latest"
51- DATAPLANE_MINOR=$( curl -sfSL " ${DATAPLANE_SRC_URL} " | \
52- grep ' "tag_name":' | \
53- sed -E ' s/.*"v?([^"]+)".*/\1/' )
50+ DATAPLANE_SRC_URL=" https://api.github.com/repos/haproxytech/dataplaneapi/releases"
51+ DATAPLANE_SRC_URL_CONTENT=$( curl -sfSL " ${DATAPLANE_SRC_URL} " )
52+ DATAPLANE_BRANCH=" ${HAPROXY_BRANCH} "
53+
54+ DATAPLANE_MINOR=$( echo " ${DATAPLANE_SRC_URL_CONTENT} " | \
55+ grep " \" tag_name\" :.*\" v${DATAPLANE_BRANCH} \." | \
56+ sed -E ' s/.*"v?([^"]+)".*/\1/' | \
57+ sort -V | \
58+ tail -1
59+ )
5460
5561if [ -z " ${DATAPLANE_MINOR} " ]; then
56- echo " Could not identify latest HAProxy Dataplane release"
57- exit 1
62+ DATAPLANE_SRC_URL=" https://api.github.com/repos/haproxytech/dataplaneapi/releases/latest"
63+ DATAPLANE_MINOR=$( curl -sfSL " ${DATAPLANE_SRC_URL} " | \
64+ grep ' "tag_name":' | \
65+ sed -E ' s/.*"v?([^"]+)".*/\1/' )
5866fi
5967
60- DATAPLANE_SRC_URL=" https://api.github.com/repos/haproxytech/dataplaneapi/releases"
61- DATAPLANE_V2_MINOR=$( curl -sfSL " ${DATAPLANE_SRC_URL} " | \
62- grep ' "tag_name":.*"v2' | \
68+ DATAPLANE_V2_MINOR=$( echo " ${DATAPLANE_SRC_URL_CONTENT} " | \
69+ grep ' "tag_name":.*"v2\.' | \
6370 sed -E ' s/.*"v?([^"]+)".*/\1/' | \
6471 sort -V | \
6572 tail -1
You can’t perform that action at this time.
0 commit comments