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

Commit a6ed5c66 authored by Alexandre Roux's avatar Alexandre Roux
Browse files

Merge branch 'master-fix-new-process' into 'master'

Master fix new process

See merge request e/os/releases!202
parents 36b49051 67809af1
Loading
Loading
Loading
Loading
+27 −16
Original line number Diff line number Diff line
@@ -16,12 +16,14 @@ iterate_remote () {
    projects=`xmlstarlet select --template --value-of /manifest/project[@remote=\"$1\"]/@name $2`
    for project in $projects; do
        git clone git@gitlab.e.foundation:$project current_project
        if [ $? -eq 0 ]; then
            cd current_project
            echo "creating branch "$new_version" on "$project

            create_branch $new_version origin
            cd ..
            rm -rf current_project
        fi
        
    done
}
parse_manifests () {
@@ -44,7 +46,7 @@ parse_and_update_project_manifest () {
sync_main_manifest(){
    cd "$SRC_DIR"
    repo init --depth 1 -u $REPO -b $1
    repo sync -c --force-sync --force-sync --force-remove-dirty --prune
    repo sync -c --force-sync --force-sync --force-remove-dirty --prune -v
}

# Identify new tag name
@@ -58,7 +60,8 @@ then
    latest_version="${latest_version#*\.}"
    latest_version="${latest_version%\.*}"
    latest_version="${latest_version%\-*}"
    new_version=v1.$((latest_version+1))-$current_version
    new_version_without_android=v1.$((latest_version+1))
    new_version=$new_version_without_android-$current_version
    echo "New version: "$new_version

    cd "$SRC_DIR"
@@ -88,18 +91,26 @@ then


    echo "==> Creating new branches on /e/ projects"
    repo forall -e -v -c 'if [ "${REPO_REMOTE}" = "e" ] || [ "${REPO_REMOTE}" = "e-priv" ] ;
    repo forall -e -v -p -c 'if [ "${REPO_REMOTE}" = "e" ] || [ "${REPO_REMOTE}" = "e-priv" ] ;
    then
        pwd
        if [ "${REPO_REMOTE}" = "e" ];
        then
            git remote add e-priv ssh://git@gitlab.e.foundation:2222/${REPO_PROJECT}
            git remote add e-priv ssh://git@gitlab.e.foundation:2222/${REPO_PROJECT} || true
            git fetch e-priv
        fi;
        git remote -v
        echo "Creating branch "'$new_version'" on "$2
        git checkout -b "'$new_version'"
        git push e-priv "'$new_version'"
        if [ "${REPO_RREV}" = "main" ] || [ "${REPO_RREV}" = "master" ]; then
            version='$new_version_without_android'
        else
            version='$new_version'
        fi
        
        if [ ! "$(git branch --list $version)" ]; 
        then
            echo "Creating branch "$version" on "${REPO_PROJECT}
            git checkout -b "$version"
            git push e-priv "$version" || true
        fi
    fi ;'


@@ -110,7 +121,7 @@ then
    parse_and_update_project_manifest git@gitlab.e.foundation:e/os/local_manifests.git
    echo ">> Get custom vendor manifests"
    parse_and_update_project_manifest git@gitlab.e.foundation:e/devices/manifests.git 
   
    cd ..