Skip to content

Commit 33b4670

Browse files
committed
Update Build.ps1
Fixed issue where Clean task would execute after Init, removing the $PublishDir before the Build task.
1 parent be42518 commit 33b4670

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/Build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Task Test -depends Build {
157157
Invoke-Pester $PSScriptRoot
158158
}
159159

160-
Task Build -depends Clean -requiredVariables PublishDir, Exclude, ModuleName {
160+
Task Build -depends Clean, Init -requiredVariables PublishDir, Exclude, ModuleName {
161161
Copy-Item -Path $PSScriptRoot\* -Destination $PublishDir -Recurse -Exclude $Exclude
162162

163163
# Get contents of the ReleaseNotes file and update the copied module manifest file
@@ -169,7 +169,7 @@ Task Build -depends Clean -requiredVariables PublishDir, Exclude, ModuleName {
169169
# }
170170
}
171171

172-
Task Clean -depends Init -requiredVariables PublishDir {
172+
Task Clean -requiredVariables PublishDir {
173173
# Sanity check the dir we are about to "clean". If $PublishDir were to
174174
# inadvertently get set to $null, the Remove-Item commmand removes the
175175
# contents of \*. That's a bad day. Ask me how I know? :-(

0 commit comments

Comments
 (0)