Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(scripts/termux_pkg_upgrade_version): Fetch before attempting to push. #22818

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/updates/utils/termux_pkg_upgrade_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ termux_pkg_upgrade_version() {
if [[ "${GIT_PUSH_PACKAGES}" == "true" ]]; then
echo "INFO: Pushing package."
stderr="$(
# Fetch and pull before attempting to push to avoid a situation
# where a long running auto update fails because a later faster
# autoupdate got committed first and now the git history is out of date.
git fetch 2>&1 >/dev/null
git pull --rebase 2>&1 >/dev/null
git push 2>&1 >/dev/null
)" || {
Expand Down