Skip to content
Snippets Groups Projects
Commit 566625e3 authored by Sam Gleske's avatar Sam Gleske
Browse files

Update_mirror offline gitlab cron fix

If run in a cron job and gitlab is off-line update_mirror.sh
would turn the SVN repository into a bare repository.  This
then breaks the SVN mirror until bare is set back to false.
parent c3a2760a
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,13 @@ if git config --get svn-remote.svn.url &> /dev/null;then
git svn rebase
cd .git
git config --bool core.bare true
git push gitlab
#bug fix for when gitlab is off-line during a cron job the bare setting gets set back to false when the git command fails
set +e
if ! git push gitlab;then
git config --bool core.bare false
exit 1
fi
set -e
git config --bool core.bare false
else
#just a git mirror so mirror it accordingly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment