Skip to content

Commit

Permalink
Avoid ManagedOSVersion naming collisions by appending type to name
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <[email protected]>
  • Loading branch information
anmazzotti committed Jun 5, 2024
1 parent 124c58a commit a274ace
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 42 deletions.
10 changes: 5 additions & 5 deletions channels/sle-micro-5-5-kvm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"metadata": {
"name": "kvm-v2.0.2-2.2.115"
"name": "kvm-v2.0.2-2.2.115-os"
},
"spec": {
"version": "v2.0.2-2.2.115",
Expand All @@ -14,7 +14,7 @@
},
{
"metadata": {
"name": "kvm-v2.0.2-2.2.20"
"name": "kvm-v2.0.2-2.2.20-os"
},
"spec": {
"version": "v2.0.2-2.2.20",
Expand All @@ -27,7 +27,7 @@
},
{
"metadata": {
"name": "kvm-v2.0.2-2.2.85"
"name": "kvm-v2.0.2-2.2.85-os"
},
"spec": {
"version": "v2.0.2-2.2.85",
Expand All @@ -40,7 +40,7 @@
},
{
"metadata": {
"name": "kvm-v2.0.4-3.5.19"
"name": "kvm-v2.0.4-3.5.19-os"
},
"spec": {
"version": "v2.0.4-3.5.19",
Expand All @@ -53,7 +53,7 @@
},
{
"metadata": {
"name": "kvm-v2.0.4-3.5.2"
"name": "kvm-v2.0.4-3.5.2-os"
},
"spec": {
"version": "v2.0.4-3.5.2",
Expand Down
10 changes: 5 additions & 5 deletions channels/sle-micro-5-5-rt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"metadata": {
"name": "rt-v2.0.2-3.2.119"
"name": "rt-v2.0.2-3.2.119-os"
},
"spec": {
"version": "v2.0.2-3.2.119",
Expand All @@ -14,7 +14,7 @@
},
{
"metadata": {
"name": "rt-v2.0.2-3.2.23"
"name": "rt-v2.0.2-3.2.23-os"
},
"spec": {
"version": "v2.0.2-3.2.23",
Expand All @@ -27,7 +27,7 @@
},
{
"metadata": {
"name": "rt-v2.0.2-3.2.86"
"name": "rt-v2.0.2-3.2.86-os"
},
"spec": {
"version": "v2.0.2-3.2.86",
Expand All @@ -40,7 +40,7 @@
},
{
"metadata": {
"name": "rt-v2.0.4-4.5.21"
"name": "rt-v2.0.4-4.5.21-os"
},
"spec": {
"version": "v2.0.4-4.5.21",
Expand All @@ -53,7 +53,7 @@
},
{
"metadata": {
"name": "rt-v2.0.4-4.5.3"
"name": "rt-v2.0.4-4.5.3-os"
},
"spec": {
"version": "v2.0.4-4.5.3",
Expand Down
56 changes: 28 additions & 28 deletions channels/sle-micro-5-5.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"metadata": {
"name": "v2.0.2-4.2.102"
"name": "v2.0.2-4.2.102-os"
},
"spec": {
"version": "v2.0.2-4.2.102",
Expand All @@ -14,7 +14,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.105"
"name": "v2.0.2-4.2.105-os"
},
"spec": {
"version": "v2.0.2-4.2.105",
Expand All @@ -27,7 +27,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.107"
"name": "v2.0.2-4.2.107-os"
},
"spec": {
"version": "v2.0.2-4.2.107",
Expand All @@ -40,7 +40,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.109"
"name": "v2.0.2-4.2.109-os"
},
"spec": {
"version": "v2.0.2-4.2.109",
Expand All @@ -53,7 +53,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.111"
"name": "v2.0.2-4.2.111-os"
},
"spec": {
"version": "v2.0.2-4.2.111",
Expand All @@ -66,7 +66,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.20"
"name": "v2.0.2-4.2.20-os"
},
"spec": {
"version": "v2.0.2-4.2.20",
Expand All @@ -79,7 +79,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.70"
"name": "v2.0.2-4.2.70-os"
},
"spec": {
"version": "v2.0.2-4.2.70",
Expand All @@ -92,7 +92,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.85"
"name": "v2.0.2-4.2.85-os"
},
"spec": {
"version": "v2.0.2-4.2.85",
Expand All @@ -105,7 +105,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.87"
"name": "v2.0.2-4.2.87-os"
},
"spec": {
"version": "v2.0.2-4.2.87",
Expand All @@ -118,7 +118,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.89"
"name": "v2.0.2-4.2.89-os"
},
"spec": {
"version": "v2.0.2-4.2.89",
Expand All @@ -131,7 +131,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.91"
"name": "v2.0.2-4.2.91-os"
},
"spec": {
"version": "v2.0.2-4.2.91",
Expand All @@ -144,7 +144,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.93"
"name": "v2.0.2-4.2.93-os"
},
"spec": {
"version": "v2.0.2-4.2.93",
Expand All @@ -157,7 +157,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.94"
"name": "v2.0.2-4.2.94-os"
},
"spec": {
"version": "v2.0.2-4.2.94",
Expand All @@ -170,7 +170,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.96"
"name": "v2.0.2-4.2.96-os"
},
"spec": {
"version": "v2.0.2-4.2.96",
Expand All @@ -183,7 +183,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.97"
"name": "v2.0.2-4.2.97-os"
},
"spec": {
"version": "v2.0.2-4.2.97",
Expand All @@ -196,7 +196,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.99"
"name": "v2.0.2-4.2.99-os"
},
"spec": {
"version": "v2.0.2-4.2.99",
Expand All @@ -209,7 +209,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.15"
"name": "v2.0.4-5.5.15-os"
},
"spec": {
"version": "v2.0.4-5.5.15",
Expand All @@ -222,7 +222,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.18"
"name": "v2.0.4-5.5.18-os"
},
"spec": {
"version": "v2.0.4-5.5.18",
Expand All @@ -235,7 +235,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.2"
"name": "v2.0.4-5.5.2-os"
},
"spec": {
"version": "v2.0.4-5.5.2",
Expand All @@ -248,7 +248,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.24"
"name": "v2.0.4-5.5.24-os"
},
"spec": {
"version": "v2.0.4-5.5.24",
Expand All @@ -261,7 +261,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.28"
"name": "v2.0.4-5.5.28-os"
},
"spec": {
"version": "v2.0.4-5.5.28",
Expand All @@ -274,7 +274,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.30"
"name": "v2.0.4-5.5.30-os"
},
"spec": {
"version": "v2.0.4-5.5.30",
Expand All @@ -287,7 +287,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.128"
"name": "v2.0.2-4.2.128-iso"
},
"spec": {
"version": "v2.0.2-4.2.128",
Expand All @@ -300,7 +300,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.27"
"name": "v2.0.2-4.2.27-iso"
},
"spec": {
"version": "v2.0.2-4.2.27",
Expand All @@ -313,7 +313,7 @@
},
{
"metadata": {
"name": "v2.0.2-4.2.97"
"name": "v2.0.2-4.2.97-iso"
},
"spec": {
"version": "v2.0.2-4.2.97",
Expand All @@ -326,7 +326,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.20"
"name": "v2.0.4-5.5.20-iso"
},
"spec": {
"version": "v2.0.4-5.5.20",
Expand All @@ -339,7 +339,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.3"
"name": "v2.0.4-5.5.3-iso"
},
"spec": {
"version": "v2.0.4-5.5.3",
Expand All @@ -352,7 +352,7 @@
},
{
"metadata": {
"name": "v2.0.4-5.5.6"
"name": "v2.0.4-5.5.6-iso"
},
"spec": {
"version": "v2.0.4-5.5.6",
Expand Down
9 changes: 5 additions & 4 deletions refresh_channels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ set -e
function format_managed_os_version_name() {
local flavor=$1
local tag=$2
local type=$3
if [ -z "$flavor" ]; then
echo "v${tag}"
echo "v${tag}-${type}"
else
echo "${flavor}-v${tag}"
echo "${flavor}-v${tag}-${type}"
fi
}

Expand Down Expand Up @@ -84,7 +85,7 @@ while IFS=\= read watch; do
if [[ $tag =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ ]]; then
continue
fi
managed_os_version_name=$(format_managed_os_version_name "$flavor" "$tag")
managed_os_version_name=$(format_managed_os_version_name "$flavor" "$tag" "os")
append_os_entry "$file" "$managed_os_version_name" "$tag" "$os_repo:$tag" "$display_name OS"
done

Expand All @@ -96,7 +97,7 @@ while IFS=\= read watch; do
if [[ $tag =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ ]]; then
continue
fi
managed_os_version_name=$(format_managed_os_version_name "$flavor" "$tag")
managed_os_version_name=$(format_managed_os_version_name "$flavor" "$tag" "iso")
append_iso_entry "$file" "$managed_os_version_name" "$tag" "$iso_repo:$tag" "$display_name ISO"
done
fi
Expand Down

0 comments on commit a274ace

Please sign in to comment.