mirror of
https://github.com/jellyfin/jellyfin-build.git
synced 2024-11-23 05:49:44 +00:00
Modify backport-prs for the current structure
This commit is contained in:
parent
b3198dceb8
commit
81b6a316ef
28
backport-prs
28
backport-prs
@ -23,7 +23,7 @@ echo "Project remote: ${remote}"
|
||||
current_branch="$( git branch | grep '^*' | awk '{ print $NF }' )"
|
||||
echo "Current branch: ${current_branch}"
|
||||
|
||||
echo "Please select the release branch you want to apply backports to:"
|
||||
echo "Please select the release branch you want to apply backports from:"
|
||||
git branch | grep --color=none 'release-'
|
||||
echo -n "> "
|
||||
read release_branch
|
||||
@ -36,22 +36,39 @@ echo "Please enter the release project name (e.g. 'Release 10.7.0')"
|
||||
echo -n "> "
|
||||
read gh_project
|
||||
|
||||
echo "Please enter your full name (for the cherry-pick ref)"
|
||||
echo -n "> "
|
||||
read name
|
||||
|
||||
### REAL MEAT ###
|
||||
|
||||
echo "Synchronizing local repository with remote release branch"
|
||||
git checkout ${release_branch}
|
||||
git fetch --all
|
||||
git reset --hard
|
||||
git rebase ${remote}/${release_branch}
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Failed to rebase current master onto working directory! Stash or revert changes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Synchronizing local repository with remote master"
|
||||
git checkout master
|
||||
git fetch --all
|
||||
git reset --hard
|
||||
git rebase ${remote}/master
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Failed to rebase current master onto working directory! Stash or revert changes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git checkout ${release_branch}
|
||||
|
||||
# Get all the stable-backport PRs
|
||||
backport_pr_list="$( gh pr list --limit 999 --state merged --label "stable backport" 2>/dev/null | sort -n | awk '{ print $1 }' | tr -d '#' )"
|
||||
backport_merges=()
|
||||
|
||||
echo "We will backport the following $( wc -w <<<"${backport_pr_list}" ) PRs to the branch ${release_branch}:"
|
||||
echo "We will backport the following $( wc -w <<<"${backport_pr_list}" ) PRs from the branch ${release_branch} to master:"
|
||||
echo "$( tr '\n' ' ' <<<"${backport_pr_list}" )"
|
||||
echo
|
||||
echo -n "Press <Enter> to continue. "
|
||||
@ -63,7 +80,12 @@ for pr in ${backport_pr_list}; do
|
||||
backport_merges+=( "${merge_commit}" )
|
||||
done
|
||||
|
||||
git checkout ${release_branch}
|
||||
git checkout master
|
||||
|
||||
export GIT_AUTHOR_NAME="${name}"
|
||||
export GIT_AUTHOR_EMAIL="team@jellyfin.org"
|
||||
export GIT_COMMITTER_NAME="${name}"
|
||||
export GIT_COMMITTER_EMAIL="team@jellyfin.org"
|
||||
|
||||
for merge in ${backport_merges[@]}; do
|
||||
echo "Parsing ${merge}..."
|
||||
|
Loading…
Reference in New Issue
Block a user