Skip to content

Commit

Permalink
ci-automation/image-changes: Source version.txt
Browse files Browse the repository at this point in the history
This avoid messing with quotes.
  • Loading branch information
krnowak committed Oct 12, 2023
1 parent 90127ab commit 165d639
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ci-automation/image_changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -488,21 +488,21 @@ function get_channel_a_and_version_a() {
# --

# Gets the latest release for given channel and board. For lts channel
# gets a version of the latest LTS.
function channel_version() {
# gets a version of the latest LTS. Runs in a subshell.
function channel_version() (
local channel=${1}; shift
local board=${1}; shift

curl \
-fsSL \
--retry-delay 1 \
--retry 60 \
--retry-connrefused \
--retry-max-time 60 \
--connect-timeout 20 \
"https://${channel}.release.flatcar-linux.net/${board}/current/version.txt" | \
grep -m 1 'FLATCAR_VERSION=' | cut -d = -f 2-
}
source <(curl \
-fsSL \
--retry-delay 1 \
--retry 60 \
--retry-connrefused \
--retry-max-time 60 \
--connect-timeout 20 \
"https://${channel}.release.flatcar-linux.net/${board}/current/version.txt")
echo "${FLATCAR_VERSION}"
)
# --

# Prints some reports using scripts from the passed path to
Expand Down

0 comments on commit 165d639

Please sign in to comment.