Loading .gitlab-ci.yml +2 −9 Original line number Diff line number Diff line Loading @@ -50,21 +50,16 @@ build: - git config --global http.sslverify false # update $UPSTREAM_BRANCH & tags - git fetch origin - git checkout $UPSTREAM_BRANCH - git remote add upstream $UPSTREAM_URL - git fetch upstream - git pull upstream $UPSTREAM_DEFAULT_BRANCH - git push origin $UPSTREAM_BRANCH - git push origin --tags # checkout to latest tag commit to $TEMP_LATEST_TAG_BRANCH - git checkout $(git describe --tags --abbrev=0) - git checkout $(git ls-remote --tags upstream | grep -o 'refs/tags/[0-9]*\.[0-9]*\.[0-9]*' | sort -r | head -n 1 | grep -o '[^\/]*$') - git checkout -b $TEMP_LATEST_TAG_BRANCH # merge $LOCAL_BRANCH with $TEMP_LATEST_TAG_BRANCH & push - git checkout $LOCAL_BRANCH - git submodule sync - git submodule update --init --recursive --force - git merge $TEMP_LATEST_TAG_BRANCH - git push origin $LOCAL_BRANCH - git push origin --tags # remove unwanted local branch & remote - git branch -D $TEMP_LATEST_TAG_BRANCH - git remote remove upstream Loading @@ -74,7 +69,5 @@ update-default-branch: extends: .update-from-upstream variables: LOCAL_BRANCH: main UPSTREAM_BRANCH: upstream/master UPSTREAM_DEFAULT_BRANCH: main UPSTREAM_URL: https://github.com/nextcloud/notes-android.git TEMP_LATEST_TAG_BRANCH: latest_upstream_tag_branch No newline at end of file Loading
.gitlab-ci.yml +2 −9 Original line number Diff line number Diff line Loading @@ -50,21 +50,16 @@ build: - git config --global http.sslverify false # update $UPSTREAM_BRANCH & tags - git fetch origin - git checkout $UPSTREAM_BRANCH - git remote add upstream $UPSTREAM_URL - git fetch upstream - git pull upstream $UPSTREAM_DEFAULT_BRANCH - git push origin $UPSTREAM_BRANCH - git push origin --tags # checkout to latest tag commit to $TEMP_LATEST_TAG_BRANCH - git checkout $(git describe --tags --abbrev=0) - git checkout $(git ls-remote --tags upstream | grep -o 'refs/tags/[0-9]*\.[0-9]*\.[0-9]*' | sort -r | head -n 1 | grep -o '[^\/]*$') - git checkout -b $TEMP_LATEST_TAG_BRANCH # merge $LOCAL_BRANCH with $TEMP_LATEST_TAG_BRANCH & push - git checkout $LOCAL_BRANCH - git submodule sync - git submodule update --init --recursive --force - git merge $TEMP_LATEST_TAG_BRANCH - git push origin $LOCAL_BRANCH - git push origin --tags # remove unwanted local branch & remote - git branch -D $TEMP_LATEST_TAG_BRANCH - git remote remove upstream Loading @@ -74,7 +69,5 @@ update-default-branch: extends: .update-from-upstream variables: LOCAL_BRANCH: main UPSTREAM_BRANCH: upstream/master UPSTREAM_DEFAULT_BRANCH: main UPSTREAM_URL: https://github.com/nextcloud/notes-android.git TEMP_LATEST_TAG_BRANCH: latest_upstream_tag_branch No newline at end of file