Commit 7ab2304f authored by Michal Sojka's avatar Michal Sojka

Update ae sync to push only when it is needed

parent 52127224
......@@ -29,7 +29,7 @@ handle_commit() {
done
echo -n "${trees[.]}" | git mktree ))
ae=$(git rev-parse refs/heads/ae) || ae=
ae=$(git rev-parse --verify --quiet refs/heads/ae)
if [ -z "$ae" ] || ! git diff-tree --quiet $ae $new_tree; then
export GIT_AUTHOR_NAME="$(git log --format=%an -1 $commit)"
export GIT_AUTHOR_EMAIL="$(git log --format=%ae -1 $commit)"
......@@ -42,11 +42,14 @@ handle_commit() {
while read oldrev newrev refname; do
if [ "$refname" = "refs/heads/master" ]; then
echo "Checking for AE updates"
ae=$(git rev-parse --verify --quiet refs/heads/ae)
for rev in $(git rev-list --reverse $oldrev..$newrev); do
handle_commit $rev
done
echo "Pushing AE to BRUTE"
# You have to configure brutegit remote manually
git push -f --quiet brutegit ae:master
if [ $ae != $(git rev-parse --verify --quiet refs/heads/ae) ]; then
echo "Pushing AE to BRUTE"
# You have to configure brutegit remote manually
git push -f --quiet brutegit ae:master
fi
fi
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment