File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ public extension DeploymentMethod {
5959 at: folder. path
6060 )
6161
62+ try shellOut (
63+ to: " git checkout \( branch) || git checkout -b \( branch) " ,
64+ at: folder. path
65+ )
66+
6267 try folder. empty ( )
6368 }
6469
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ final class DeploymentTests: PublishTestCase {
6262
6363 try shellOut ( to: [
6464 " git init " ,
65+ // Not all git installations init with a master branch.
66+ " git checkout master || git checkout -b master " ,
6567 " git config --local receive.denyCurrentBranch updateInstead "
6668 ] , at: remote. path)
6769
@@ -86,7 +88,14 @@ final class DeploymentTests: PublishTestCase {
8688 let remote = try container. createSubfolder ( named: " Remote.git " )
8789 let repo = try container. createSubfolder ( named: " Repo " )
8890
89- try shellOut ( to: . gitInit( ) , at: remote. path)
91+ try shellOut (
92+ to: [
93+ " git init " ,
94+ // Not all git installations init with a master branch.
95+ " git checkout master || git checkout -b master "
96+ ] ,
97+ at: remote. path
98+ )
9099
91100 // First generate
92101 try publishWebsite ( in: repo, using: [
You can’t perform that action at this time.
0 commit comments