summaryrefslogtreecommitdiff
path: root/src/wrapper.hs
diff options
context:
space:
mode:
authorJoey Hess2015-09-08 16:46:38 -0400
committerJoey Hess2015-09-08 16:46:38 -0400
commit226897142791a69b70905fd0442708f6ae6d9043 (patch)
treedf7e11a1f92acd6a64affab0d4026775a823a5ab /src/wrapper.hs
parent1575e18e549f54e53825c4860a98aecfbcc28598 (diff)
propellor spin
Diffstat (limited to 'src/wrapper.hs')
-rw-r--r--src/wrapper.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wrapper.hs b/src/wrapper.hs
index a73ed969..e367fe69 100644
--- a/src/wrapper.hs
+++ b/src/wrapper.hs
@@ -74,7 +74,13 @@ wrapper args propellordir propellorbin = do
fetchUpstreamBranch propellordir distrepo
changeWorkingDirectory propellordir
void $ boolSystem "git" [Param "remote", Param "rm", Param "origin"]
- , void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir]
+ , do
+ void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir]
+ changeWorkingDirectory propellordir
+ -- Rename origin to upstream and avoid
+ -- git push to that read-only repo.
+ void $ boolSystem "git" [Param "remote", Param "rename", Param "origin", Param "upstream"]
+ void $ boolSystem "git" [Param "config", Param "--unset", Param "branch.master.remote", Param "upstream"]
)
checkRepo = whenM (doesFileExist disthead <&&> doesFileExist (propellordir </> "propellor.cabal")) $ do