[ci] fix patching

This commit is contained in:
JAremko 2021-07-07 15:02:39 +03:00 committed by Eugene Yaremenko
parent 04bddbb5b9
commit 7c7843d121
2 changed files with 5 additions and 6 deletions

View File

@ -10,9 +10,10 @@
##
## License: GPLv3
git add --all
if [[ -z "$(git status --porcelain)" ]]; then
echo "No changes. Exiting."
exit 0
else
git diff HEAD > "/tmp/${PUBLISH}.patch"
echo "Changed files:"
git status --porcelain
@ -24,7 +25,4 @@ if [[ -z "$(git status --porcelain)" ]]; then
echo "\"/tmp/${PUBLISH}.patch\" is empty while the repo has changes."
exit 0
fi
else
echo "No changes. Exiting."
exit 0
fi

View File

@ -26,7 +26,8 @@ fork_url="https://${UPD_BOT_LOGIN}:${UPD_BOT_GIT_TK}"
fork_url+="@github.com/${UPD_BOT_LOGIN}/${UPD_BOT_REPO}.git"
git remote set-url "${UPD_BOT_LOGIN}" "${fork_url}"
echo_headline "Pushing changes"
hub push -f "${UPD_BOT_LOGIN}" "${PUBLISH}"
hub push -f "${UPD_BOT_LOGIN}" "${PUBLISH}" > /dev/null 2>&1
# prevents token leak ^^^^^^^^^^^^^^
if [ $? -ne 0 ]; then
echo "hub push failed"
exit 2