Skip to content

Commit

Permalink
Split psake runs into build/test and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
fireflycons committed Sep 16, 2018
1 parent 1f59b26 commit 4806cf4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
File renamed without changes.
7 changes: 5 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ test:
only:
- Parser

after_test: # Now run pester tests and possibly deploy to PSGallery
- ps: . .\TestAndDeploy.ps1
after_test: # Now layout PS Module and run pester tests.
- ps: . .\PrepareAndTestModule.ps1

deploy_script: # Deploy to PS Gallery
- ps: Invoke-psake -buildFile .\psake.ps1 -taskList Deploy -nologo

#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
7 changes: 5 additions & 2 deletions psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Properties {

}

Task Default -Depends Deploy
Task Default -Depends PrepareModule

Task Init {
$lines
Expand Down Expand Up @@ -85,6 +85,9 @@ Task Init {
}
}


Task PrepareModule -Depends BuildHelp { }

Task Build -Depends Init {

# Gather C# compiler output. Place in module staging directory.
Expand Down Expand Up @@ -185,7 +188,7 @@ Task UpdateModuleVersion -Depends Test {
}
}

Task Deploy -Depends BuildHelp {
Task Deploy -Depends Init {
$lines

# Gate deployment
Expand Down

0 comments on commit 4806cf4

Please sign in to comment.