mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-27 05:21:34 +01:00
ci-automation/image-changes: Factor out curl invocation
This commit is contained in:
parent
d3e903db33
commit
3e8bd5b8ee
@ -528,6 +528,15 @@ function channel_version() (
|
|||||||
# traps.
|
# traps.
|
||||||
trap 'rm "${tmp_version_txt}"' EXIT
|
trap 'rm "${tmp_version_txt}"' EXIT
|
||||||
|
|
||||||
|
curl_to_stdout "https://${channel}.release.flatcar-linux.net/${board}/current/version.txt" >"${tmp_version_txt}"
|
||||||
|
source "${tmp_version_txt}"
|
||||||
|
echo "${FLATCAR_VERSION}"
|
||||||
|
)
|
||||||
|
# --
|
||||||
|
|
||||||
|
function curl_to_stdout() {
|
||||||
|
local url=${1}; shift
|
||||||
|
|
||||||
curl \
|
curl \
|
||||||
-fsSL \
|
-fsSL \
|
||||||
--retry-delay 1 \
|
--retry-delay 1 \
|
||||||
@ -535,10 +544,8 @@ function channel_version() (
|
|||||||
--retry-connrefused \
|
--retry-connrefused \
|
||||||
--retry-max-time 60 \
|
--retry-max-time 60 \
|
||||||
--connect-timeout 20 \
|
--connect-timeout 20 \
|
||||||
"https://${channel}.release.flatcar-linux.net/${board}/current/version.txt" >"${tmp_version_txt}"
|
"${url}"
|
||||||
source "${tmp_version_txt}"
|
}
|
||||||
echo "${FLATCAR_VERSION}"
|
|
||||||
)
|
|
||||||
# --
|
# --
|
||||||
|
|
||||||
# Prints some reports using scripts from the passed path to
|
# Prints some reports using scripts from the passed path to
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user