Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2bc5ff7 authored by Jackeagle's avatar Jackeagle
Browse files

fix(manifest): correct e/e-priv remote revision in version branch manifest

The <remote name="e"> and <remote name="e-priv"> elements were never
updated by the existing sed commands (which only match project lines with
remote="e", not the remote element itself with name="e"). This caused
44+ projects without explicit revision attributes to sync from main
instead of the version branch during REGENERATE_MANIFEST=false runs,
resulting in main branch SHAs being written into the release manifest.
parent 7661ddb9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -79,6 +79,14 @@ then
    cd current_project
    find . -type f -name "*.xml" -exec sed -i '/remote="e"/s/revision="main"/revision="'$new_version_without_android'"/' {} +
    find . -type f -name "*.xml" -exec sed -i '/remote="e"/s/revision="master"/revision="'$new_version_without_android'"/' {} +
    # Fix <remote name="e/e-priv"> elements - sed above only matches project lines (remote="e"),
    # not the remote element itself (name="e"), so projects relying on remote default would still sync from main.
    # Use refs/heads/$new_version (e.g. refs/heads/v3.6-a16) so android-specific repos without explicit
    # revision track the correct version branch, not main.
    find . -type f -name "*.xml" -exec xmlstarlet ed --inplace \
        -u "/manifest/remote[@name='e']/@revision" -v "refs/heads/$new_version" {} \;
    find . -type f -name "*.xml" -exec xmlstarlet ed --inplace \
        -u "/manifest/remote[@name='e-priv']/@revision" -v "refs/heads/$new_version" {} \;
    sed -i 's/'$CI_COMMIT_REF_NAME'/'$new_version'/' default.xml
    git add \*.xml
    git commit -m "creating "$new_version" manifest"