Skip to content
Snippets Groups Projects
Commit bb261079 authored by Walter Lozano's avatar Walter Lozano Committed by Dylan Aïssi
Browse files

branch-update-repo: Properly handle branching a stable release


Stable releases are special as the the name is very similar to the preview
one. To properly check if the repo was already branched the check should
be done using full words and not only parts, if not the match will always
be true.

As a real example, when branching v2025 from v2025pre the check for v2025
will true as if not using full words.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent c337ae8b
No related branches found
No related tags found
1 merge request!217Branching improvements
......@@ -58,7 +58,7 @@ checkout-repo(){
}
update-repo-default(){
if [ -f .gitlab-ci.yml ] && ! grep -q ${NEXT_RELEASE} .gitlab-ci.yml
if [ -f .gitlab-ci.yml ] && ! grep -q -w ${NEXT_RELEASE} .gitlab-ci.yml
then
sed -i "s/RELEASE: .*/RELEASE: ${NEXT_RELEASE}/" .gitlab-ci.yml
sed -i "s/release: .*/release: ${NEXT_RELEASE}/" .gitlab-ci.yml
......@@ -68,7 +68,7 @@ update-repo-default(){
}
update-repo-infrastructure-infrastructure(){
if [ -f gitlab-rulez/rulez.yaml ] && ! grep -q ${NEXT_RELEASE} gitlab-rulez/rulez.yaml
if [ -f gitlab-rulez/rulez.yaml ] && ! grep -q -w ${NEXT_RELEASE} gitlab-rulez/rulez.yaml
then
sed -i "s/\&current_release_branch .*/\&current_release_branch ${OSNAME}\/${NEXT_RELEASE}/" gitlab-rulez/rulez.yaml
git commit -s -m "Bump to ${NEXT_RELEASE}" gitlab-rulez/rulez.yaml
......@@ -92,7 +92,7 @@ update-repo-ci-flatdeb-builder(){
}
udpate-repo-image-recipes(){
if [ -f .gitlab-ci.yml ] && ! grep -q ${NEXT_RELEASE} .gitlab-ci.yml
if [ -f .gitlab-ci.yml ] && ! grep -q -w ${NEXT_RELEASE} .gitlab-ci.yml
then
sed -i "s/RELEASE: .*/RELEASE: ${NEXT_RELEASE}/" .gitlab-ci.yml
sed -i "s/release: .*/release: ${NEXT_RELEASE}/" .gitlab-ci.yml
......@@ -112,7 +112,7 @@ update-repo-flatpak-runtime(){
}
update-repo-tiny-images(){
if [ -f .gitlab-ci.yml ] && ! grep -q ${NEXT_RELEASE} .gitlab-ci.yml
if [ -f .gitlab-ci.yml ] && ! grep -q -w ${NEXT_RELEASE} .gitlab-ci.yml
then
sed -i "s/release: .*/release: ${NEXT_RELEASE}/" .gitlab-ci.yml
sed -i "s/release_version: .*/release_version: ${NEXT_RELEASE}/" lavatests/*.yaml
......@@ -146,7 +146,7 @@ update-repo-infrastructure(){
}
update-repo-test-cases(){
if [ -f .gitlab-ci.yml ] && ! grep -q ${NEXT_RELEASE} .gitlab-ci.yml
if [ -f .gitlab-ci.yml ] && ! grep -q -w ${NEXT_RELEASE} .gitlab-ci.yml
then
sed -i "s/RELEASE: .*/RELEASE: ${NEXT_RELEASE}/" .gitlab-ci.yml
sed -i "s/release: .*/release: ${NEXT_RELEASE}/" .gitlab-ci.yml
......@@ -160,7 +160,7 @@ update-repo-test-cases(){
}
update-repo-tests-default(){
if [ -f .gitlab-ci.yml ] && ! grep -q ${NEXT_RELEASE} .gitlab-ci.yml
if [ -f .gitlab-ci.yml ] && ! grep -q -w ${NEXT_RELEASE} .gitlab-ci.yml
then
sed -i "s/RELEASE: .*/RELEASE: ${NEXT_RELEASE}/" .gitlab-ci.yml
sed -i "s/release: .*/release: ${NEXT_RELEASE}/" .gitlab-ci.yml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment