rocmPackages_5: update script: error if version > 5
Further prevent bot-based updates
This commit is contained in:
parent
b00586cb26
commit
252aec4632
2 changed files with 11 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue