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

fold-security-update-branches: Rework confusing check


To make the script easier to read rework the check for security and updates.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent d0468744
No related branches found
No related tags found
1 merge request!189Improvements to folding pipeline (2)
......@@ -113,8 +113,8 @@ function fold_and_clean ()
else
echo
echo "Check if branch $OSNAME/$release-$branch exists on server"
is_branch_available=$(get-repo-branch "pkg/$pkg" "$OSNAME/$release-$branch")
if [ -z "$is_branch_available" ] || [ "$is_branch_available" = "null" ]
branch_rev=$(get-repo-branch "pkg/$pkg" "$OSNAME/$release-$branch")
if [ -z "$branch_rev" ] || [ "$branch_rev" = "null" ]
then
echo "Branch $OSNAME/$release-$branch non-existent for package $pkg on remote git repository. Skipping."
echo
......@@ -122,6 +122,9 @@ function fold_and_clean ()
return 0
fi
echo "Checking if $release is available"
base_rev=$(get-repo-branch pkg/$pkg $OSNAME/$release)
other_branch=
if [ "$branch" = "security" ]
then
......@@ -131,20 +134,13 @@ function fold_and_clean ()
other_branch=security
fi
echo "Checking if $release is available"
base_rev=$(get-repo-branch pkg/$pkg $OSNAME/$release)
if [ -z "$base_rev" ] || [ "$base_rev" = null ]
then
echo "Branch $release is not available, this seems to be a new package"
fi
echo "Check if branch $OSNAME/$release-$other_branch exists on server"
is_branch_available=$(get-repo-branch "pkg/$pkg" "$OSNAME/$release-$other_branch")
branch_rev=$(get-repo-branch "pkg/$pkg" "$OSNAME/$release-$other_branch")
if [ -z "$base_rev" ] || [ "$base_rev" = null ]
then
echo "Branch $release is not available, this seems to be a new package"
echo "Package $pkg is NOT IN SYNC in branches: $release does not exist"
elif [ -n "$is_branch_available" ] && [ "$is_branch_available" != "null" ]
elif [ -n "$branch_rev" ] && [ "$branch_rev" != "null" ]
then
echo "Branch $OSNAME/$release-$other_branch which might have already been merged"
echo "Package $pkg is NOT IN SYNC in branches: $release and $release-$branch, but $release-$other_branch present"
......
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