Handle properly branch name policy based on semantic versionning
Description
Handle properly branch and tag names based on our policy
Issue(s)
https://gitlab.e.foundation/e/os/backlog/-/issues/184
teams/os-team/workshop#38
Test procedures
for BRANCH_NAME in "v1-q" "v1-q-caf-msm8952" "v1-oreo" "v0.23.1-q" "v1.0-alpha-q-FP4" "v1-r-fp4-0.23.10" "v0.23.10-r-FP4"
do
branch_dir=$(sed -E 's/^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(nougat|oreo|pie|q|r)(-[a-zA-Z0-9_]*)*$/\5/' <<< "${BRANCH_NAME}")
branch_dir=${branch_dir^^}
echo $BRANCH_NAME: $branch_dir
done
it returns
v1-q: Q
v1-q-caf-msm8952: Q
v1-oreo: OREO
v0.23.1-q: Q
v1.0-alpha-q-FP4: Q
v1-r-fp4-0.23.10: V1-R-FP4-0.23.10
v0.23.10-r-FP4: R
Technical details
Screenshots
Check list
-
Self review -
Test procedure explained -
Tested on fresh install -
Tested applied as an update -
License -
Internal documentation -
User documentation
Edited by Romain Hunault