aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-11 21:19:45 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-11 21:19:45 -0300
commit6a586cbb175b71cd1be397ac0e229410836aeeae (patch)
tree7eef2de28eada75db96cc737f5ca03e584ef5f9f
parent518445525683dc61a099c1b2b9b84a611c44ba4b (diff)
downloadpuppet-ikiwiki-6a586cbb175b71cd1be397ac0e229410836aeeae.tar.gz
puppet-ikiwiki-6a586cbb175b71cd1be397ac0e229410836aeeae.tar.bz2
Set ikiwiki's upstream branch
-rw-r--r--templates/deploy.sh.erb9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/deploy.sh.erb b/templates/deploy.sh.erb
index 8d5dfd8..2c7f789 100644
--- a/templates/deploy.sh.erb
+++ b/templates/deploy.sh.erb
@@ -14,6 +14,7 @@ REPO_OWNER="<%= scope.lookupvar('ikiwiki::git_implementation') %>"
REPO="<%= scope.lookupvar('ikiwiki::git_folder') %>/$NAME.git"
REMOTE="$REPO_OWNER@localhost:$NAME"
SITE=$BASE/$NAME
+CWD="`pwd`"
# Syntax check
if [ -z "$INSTANCE" ]; then
@@ -38,7 +39,13 @@ ikiwiki-makerepo git $SITE/"$INSTANCE"_src_tmp $REPO
git clone $REPO $SITE/"$INSTANCE"_src
# Fix remotes
-( cd $SITE/"$INSTANCE"_src && git remote rm origin && git remote add origin $REMOTE )
+
+cd $SITE/"$INSTANCE"_src
+git remote rm origin
+git remote add origin $REMOTE
+git config branch.master.remote origin
+git config branch.master.merge refs/heads/master
+cd $CWD
# Cleanup
rm -rf $SITE/"$INSTANCE"_src_tmp