Skip to content

Commit c3d6552

Browse files
author
Your Name
committed
add cron_entry to version control
1 parent 1730225 commit c3d6552

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

cron_entry.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
cd /home/robert/production/git-repo-sync
4+
su robert
5+
./sync_repo.sh 2>&1 | tee cron.log
6+
7+
8+

sync_repo.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ fi
1818

1919
cd .repo
2020

21-
echo "Fetching from SOURCE_REPO ($SOURCE_REPO)"
22-
git fetch
21+
# echo "Fetching from SOURCE_REPO ($SOURCE_REPO)"
22+
# git fetch origin master
2323

2424
for RELEASE_BRANCH in `git branch -a | grep "release-" | sort -V -r | head -n 3` ; do
2525
TARGET_BRANCHES+=" $RELEASE_BRANCH"
2626
done
2727

28+
echo "Fetching branches '$TARGET_BRANCHES' from SOURCE_REPO ($SOURCE_REPO)"
29+
git fetch origin $TARGET_BRANCHES
30+
2831
echo "Pushing branches '$TARGET_BRANCHES' to TARGET_REPO ($TARGET_REPO)"
2932

3033
# generating refspec

0 commit comments

Comments
 (0)