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 59
59
cd - > /dev/null
60
60
61
61
# 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
63
63
max_version_priority=1
64
64
65
65
for dir in ${service_dir} /* ; do
75
75
# This check can be removed once the IaaS API moves all endpoints to Beta
76
76
if [[ ${service} == " iaas" ]]; then
77
77
mv -f ${dir} /* .json ${ROOT_DIR} /oas/iaasalpha.json
78
+ continue
78
79
fi
79
80
if [[ ${ALLOW_ALPHA} != " true" ]]; then
80
81
continue
81
82
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
+
82
92
# Remove 'alpha' suffix
83
93
version=${version% alpha* }
84
- current_version_priority=1
85
94
fi
86
95
# Check if version is beta
87
96
if [[ ${version} == * beta* ]]; then
88
- current_version_priority=2
97
+ current_version_priority=500
89
98
90
99
# check if the version is e.g. "v2beta2"
91
100
if [[ ${version} =~ beta([0-9]+)$ ]]; then
You can’t perform that action at this time.
0 commit comments