File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 5959 cd - > /dev/null
6060
6161 # Prioritize GA over Beta over Alpha versions
62- # GA priority = 999, Beta priority >= 2 , Alpha priority = 1
62+ # GA priority =999, Beta priority >=500 , Alpha priority <500 and >= 1
6363 max_version_priority=1
6464
6565 for dir in ${service_dir} /* ; do
7575 # This check can be removed once the IaaS API moves all endpoints to Beta
7676 if [[ ${service} == " iaas" ]]; then
7777 mv -f ${dir} /* .json ${ROOT_DIR} /oas/iaasalpha.json
78+ continue
7879 fi
7980 if [[ ${ALLOW_ALPHA} != " true" ]]; then
8081 continue
8182 fi
83+
84+ current_version_priority=1
85+
86+ # check if the version is e.g. "v2alpha2"
87+ if [[ ${version} =~ alpha([0-9]+)$ ]]; then
88+ alphaVersion=" ${BASH_REMATCH[1]} "
89+ current_version_priority=$(( alphaVersion+ current_version_priority))
90+ fi
91+
8292 # Remove 'alpha' suffix
8393 version=${version% alpha* }
84- current_version_priority=1
8594 fi
8695 # Check if version is beta
8796 if [[ ${version} == * beta* ]]; then
88- current_version_priority=2
97+ current_version_priority=500
8998
9099 # check if the version is e.g. "v2beta2"
91100 if [[ ${version} =~ beta([0-9]+)$ ]]; then
You can’t perform that action at this time.
0 commit comments