Skip to content

Commit

Permalink
fix: show-latest-images.sh pase the new format
Browse files Browse the repository at this point in the history
  • Loading branch information
zmstone committed Nov 20, 2024
1 parent 46a7c9b commit e19a68a
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions show-latest-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
## This script prints out all the possible emqx-builder docker image tags built from the latest git tag

GREP='grep --color=never'
ALL_SYS="$($GREP -A28 'platform:' .github/workflows/main.yaml | \
$GREP -E '\-\s?\[.*\]$' | \
tr -d '\- []"' | \
sed -e '/^#.*/d' | \
cut -d',' -f1 | \
ALL_SYS="$($GREP -A28 'platforms=' .github/workflows/main.yaml | \
$GREP -oE '{.*}' | \
jq .os | \
tr -d '"' | \
sort -u)"

GIT_TAG="$(git describe --abbrev=0 --tags)"
OTP_VERSIONS="$($GREP -E "^\+\sOTP-.*" ./RELEASE.md | sed 's/\+\sOTP-//g')"
ELIXIR_VERSIONS="$($GREP -E "^\+\sElixir-.*" ./RELEASE.md | sed 's/\+\sElixir-//g')"
for elixir in $ELIXIR_VERSIONS; do
for otp in $OTP_VERSIONS; do
for sys in $ALL_SYS; do
echo "ghcr.io/emqx/emqx-builder/${GIT_TAG}:${elixir}-${otp}-${sys}"
done
OTP_ELIXIR_VERSIONS="$($GREP -oE "OTP-.*,Elixir.*" ./RELEASE.md)"
for line in $OTP_ELIXIR_VERSIONS; do
otp="$(echo "$line" | sed -n 's/.*OTP-\([^,]*\),.*/\1/p')"
elixir="$(echo "$line" | sed -n 's/.*Elixir-\([^,]*\)/\1/p')"
echo ">>>>>>>>>>>>>>> $line"
for sys in $ALL_SYS; do
echo "ghcr.io/emqx/emqx-builder/${GIT_TAG}:${elixir}-${otp}-${sys}"
done
done

0 comments on commit e19a68a

Please sign in to comment.