From: sgf Date: Wed, 8 Dec 2021 15:52:32 +0000 (+0300) Subject: feat(git): Add git hooks for sync remote. X-Git-Url: https://gitweb.sgf-dma.tk/?a=commitdiff_plain;h=ddcf04b761a77833acafcf8d16cecc6fa0c1784e;p=aoc-2021.git feat(git): Add git hooks for sync remote. --- diff --git a/git_hooks/post-commit b/git_hooks/post-commit new file mode 100755 index 0000000..f5002cd --- /dev/null +++ b/git_hooks/post-commit @@ -0,0 +1,11 @@ +#!/bin/sh + +set -euf + +remotes="$(git remote)" +if echo "$remotes" | grep -q 'sync'; then + git push --all sync + git push --tags sync +else + echo ">>>>> No sync remote defined." 1>&2 +fi