rocmPackages_5: update script: error if version > 5

Further prevent bot-based updates
This commit is contained in:
Madoura 2023-12-17 07:07:39 -06:00
parent b00586cb26
commit 252aec4632
No known key found for this signature in database
GPG key ID: 9086473B4D809BD2
2 changed files with 11 additions and 0 deletions

View file

@ -37,6 +37,12 @@ let
extVersion="$(echo $deb | grep -o -P "(?<=\.....).*(?=\..*-)")"
version="$(echo $extVersion | sed "s/0/./1" | sed "s/0/./1")"
IFS='.' read -a version_arr <<< "$version"
if (( ''${version_arr[0]} > 5 )); then
echo "'rocmPackages_5.${prefix}-bin' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${prefix}-bin'." 1>&2
exit 1
fi
if (( ''${#extVersion} == 5 )); then
repoVersion="$version"

View file

@ -23,6 +23,11 @@ let
IFS='.' read -a version_arr <<< "$version"
if (( ''${version_arr[0]} > 5 )); then
echo "'rocmPackages_5.${pname}' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." 1>&2
exit 1
fi
if [ "''${#version_arr[*]}" == 2 ]; then
version="''${version}.0"
fi