Skip to content
Snippets Groups Projects
Commit 37a78a2f authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

branch-update-repo: simplify conditions to update the default release in ci-flatdeb-builder

parent 6de23872
No related branches found
No related tags found
1 merge request!217Branching improvements
Pipeline #783211 waiting for manual action
......@@ -77,11 +77,7 @@ update-repo-infrastructure-infrastructure(){
}
update-repo-ci-flatdeb-builder(){
# Only update if the current release's major version is older than or equal to
# the major version of the new release.
current_release_major=$(grep -Po 'APERTIS_RELEASE_DEFAULT:\s+\Kv(\d{4})' ci-flatdeb-builder.yaml)
if ! grep -Eq "APERTIS_RELEASE_DEFAULT: ${NEXT_RELEASE}\b" ci-flatdeb-builder.yaml \
&& [ "$current_release_major" \< "$NEXT_RELEASE" ] || [ "$current_release_major" = "$NEXT_RELEASE"* ]
if [ -f ci-flatdeb-builder.yaml ] && ! grep -q -w "APERTIS_RELEASE_DEFAULT: ${NEXT_RELEASE}" ci-flatdeb-builder.yaml
then
sed -i "s/APERTIS_RELEASE_DEFAULT: .*/APERTIS_RELEASE_DEFAULT: ${NEXT_RELEASE}/" ci-flatdeb-builder.yaml
git add ci-flatdeb-builder.yaml
......@@ -312,4 +308,4 @@ branch)
*)
echo Invalid command
exit 1
esac
\ No newline at end of file
esac
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