Temporarily disable signing ...
... if the proper GPG key is not available, e.g., on a server. Then, it does not make sense to push the updates to the forked repo.
This commit is contained in:
parent
7f559fac96
commit
3bd25ebc84
1 changed files with 19 additions and 3 deletions
|
@ -100,9 +100,25 @@ _update_omz_fork() {
|
||||||
|
|
||||||
# Keep our personal "oh-my-zsh" fork up-to-date
|
# Keep our personal "oh-my-zsh" fork up-to-date
|
||||||
# See: https://code.webartifex.biz/alexander/oh-my-zsh
|
# See: https://code.webartifex.biz/alexander/oh-my-zsh
|
||||||
git rebase --quiet master
|
# Note: Without a proper GPG key, the rebasing is done without signing
|
||||||
git push --quiet fork forked --force
|
|
||||||
git push --quiet fork master
|
# First, check if `gpg` exists and works in general
|
||||||
|
# as it might not be set up on some servers
|
||||||
|
if _command_exists gpg; then
|
||||||
|
gpg --list-keys > /dev/null
|
||||||
|
rv=$?
|
||||||
|
else
|
||||||
|
rv=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $rv -eq 0 ] && [ $(gpg --list-keys | grep "AB5C0E319D77350FBA6CF143344EA5AB10D868E0") ]; then
|
||||||
|
git rebase --quiet master
|
||||||
|
# Only push a properly rebased and signed fork
|
||||||
|
git push --quiet fork forked --force
|
||||||
|
git push --quiet fork master
|
||||||
|
else
|
||||||
|
git -c commit.gpgsign=false rebase --quiet master
|
||||||
|
fi
|
||||||
|
|
||||||
cd $cwd
|
cd $cwd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue