@@ -46,6 +46,12 @@ Write-Host ""
4646Write-Host ""
4747"@
4848
49+ $jumpToEndStepCommandTemplate = @"
50+ git add -A
51+ git commit -m "Abort test"
52+ git checkout -b $workshopBranch -end $solutionBranch
53+ "@
54+
4955$displayEndMessageTemplate = @"
5056Write-Host ""
5157Write-Host ""
@@ -136,6 +142,7 @@ function clean(){
136142 git branch - D $testBranch * > $null
137143 git branch - D $solutionBranch * > $null
138144 git branch - D $workshopBranch * > $null
145+ git branch - D ($workshopBranch + " -end" ) * > $null
139146 generateTags | % { git branch - D ($workshopBranch + " -" + $_ ) } * > $null
140147 generateTags | % { git tag - d $_ } * > $null
141148}
@@ -159,7 +166,9 @@ function addStepNavigationCommand($nextStepTag, $nextStepNum){
159166}
160167
161168function addEndStepNavigationCommand (){
162- $displayEndMessageTemplate | out-file ' jumpToNextStep.ps1' - enc ascii
169+ $nextCommandContent = $jumpToEndStepCommandTemplate + " `r`n " + $displayEndMessageTemplate
170+
171+ $nextCommandContent | out-file ' jumpToNextStep.ps1' - enc ascii
163172 git add jumpToNextStep.ps1 > $null
164173
165174 git commit - m " Add end step navigation commands" > $null
@@ -234,7 +243,8 @@ function addNavigationCommand($nextTestTag, $nextTestNum, $currentStepNum){
234243}
235244
236245function addEndNavigationCommand (){
237- $displayEndMessageTemplate | out-file ' next.ps1' - enc ascii
246+ $nextCommandContent = $nextCommandTemplate.Replace (" @@nexttag@@" , $testBranch ) + " `r`n " + $displayEndMessageTemplate
247+ $nextCommandContent | out-file ' next.ps1' - enc ascii
238248 git add next.ps1 > $null
239249
240250 git commit - m " Add end test navigation commands" > $null
0 commit comments