Questions tagged [psake]

psake (pronounced *sah-kay*, as in Japanese rice wine) is a build automation tool implemented in Windows PowerShell.

Description

psake (pronounced sah-kay, as in Japanese rice wine) is a build automation tool implemented in Windows PowerShell. psake has a syntax inspired by rake (aka make in Ruby) and bake (aka make in Boo).

Example Build Script

properties { 
  $testMessage = ‘Executed Test!’ 
  $compileMessage = ‘Executed Compile!’ 
  $cleanMessage = ‘Executed Clean!’ 
}

task default -depends Test

task Test -depends Compile, Clean { 
  Write-Host $testMessage 
}

task Compile -depends Clean { 
  Write-Host $compileMessage 
}

task Clean { 
  Write-Host $cleanMessage 
}

Resources

105 questions
1
vote
2 answers

Integrate psake with MsBuild

I am using MSBuild for CI. I was looking recently to psake as an additional tool for creating scripts for daily builds as I need to do some updates to our builds which will be easier in psake. For the moment I’m not looking to replace our existing…
Ruslan
  • 1,059
  • 12
  • 11
1
vote
2 answers

Teamcity doesn't detect msbuild nor nUnit failures when executed from powershell

I have written a build script using psake which I run in Teamcity. I have Teamcity 6.0, so I run psake from a .cmd, but I don't think that changes anything. Everything is working fine, but I have two problems. Nunit isn't communicating with…
Mikael Östberg
  • 16,982
  • 6
  • 61
  • 79
1
vote
2 answers

PSAKE powershell & execute task not running

Trying to get a PSAKE script to work. Its seems that tasks are not executing the functions within them? I have 2 files -- default.ps1 -- Import-Module "C:\dev\Phoenix\trunk\Build\BuildScripts\include.ps1" Import-Module…
Chris McKelt
  • 1,378
  • 2
  • 17
  • 38
1
vote
1 answer

How to debug/diagnose cause of Powershell Copy-Item command failing in psake script?

I have a very simple script that uses Copy-Item in the Task Build section following the psake conventions (and examples). Right now that's all it does in an attempt to simplify the script to debug this issue. The Error: 18/07/2011 5:40:57 PM: An…
Nick Josevski
  • 4,156
  • 3
  • 43
  • 63
1
vote
0 answers

Include other PSake files from dynamic location

I basically want to do this Invoke-psake .\deploy\deploy-resources.psake.ps1 -parameters @{"CommonScriptsPath"="C:\abc"} And then have the following line in my deploy-resources.psake.ps1 file Include "$($CommonScriptsPath)\psake-common.ps1" It…
Martijn B
  • 4,065
  • 2
  • 29
  • 41
1
vote
1 answer

A way to specify msbuild from which version of .net framework on Mac?

Trying to create a build script using Psake on .Net Core 3 projects on Mac. Invoking Psake with a specific framework, Invoke-psake -buildFile default.ps1 `  -taskList Test ` -framework netcoreapp3.0 ` …
Jake
  • 35
  • 3
1
vote
1 answer

Stop nolio deployment on command line script fail

I've tried to search for this but i couldn't fine anything. I have a Nolio flow that has a command line action to deploy a solution with psake. The command line is run like this: psake.cmd .\deploy.ps1 -parameters @{env='Environment'} if…
ZuZu
  • 94
  • 1
  • 9
1
vote
1 answer

build and deployment automation for msbuild EXE projects

I'm working on some automated build changes and have some questions as to the best approach for building/packaging EXE applications. Conceptually, there are two scripts. The first builds everything at puts the resulting binaries on a share so they…
Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130
1
vote
0 answers

webpack command in psake script is failing the task

In my psake task, the following commands: exec { npm install --no-optional --no-shrinkwrap --no-package-lock } exec { npm run prod-build } with this npm script: "prod-build": "webpack --config ./webpack.prod.js --display errors-only" Gives the…
Mike Cole
  • 14,474
  • 28
  • 114
  • 194
1
vote
0 answers

Forbid TeamCity reporting build step order

In regard to similar topics covered by TeamCity buildlog for a single build step and Can I format powershell output into collapsible Tree View in TeamCity logs? we have big build pipeline driven by PSake which have plenty set tasks. Each task is…
Jaroslav Kadlec
  • 2,505
  • 4
  • 32
  • 43
1
vote
1 answer

Psake - How to activate /m switch for MSBuild?

Hi I'm trying to compile my project using MSBuild & Psake but I have problems passing the /m to MSBuild. Here is my code: Exec { MSBuild $solutionFile "/p:Configuration=$buildConfiguration;Platform=$buildPlatform;OutDir=$tempPath /m" } MSBuild…
Miguel
  • 3,786
  • 2
  • 19
  • 32
1
vote
1 answer

git and psake from Powershell

I'm trying to automate pulling the latest version of our code from bitbucket using git.exe via psake in Powershell but I'm struggling with a number of issues. I've got the following code in a Task: Exec { &('c:\Program…
Thierry
  • 6,142
  • 13
  • 66
  • 117
1
vote
1 answer

Exec command failing on some PCs in psake script to OpenCover

I have been testing running a coverage check of my unit tests using OpenCover and have created a powershell script to create the coverage report using psake. Exec { opencover.console.exe -target:"nunit3-console.exe"…
Dave Alger
  • 339
  • 7
  • 23
1
vote
2 answers

Build project's components to own .dlls

I have project, which contains lot of classes. I use this project as plugin base for one of my application. This app can load all these plugins from one .dll builded from this project. Problem is, I need to use these plugins in third-side app. This…
Qerts
  • 935
  • 1
  • 15
  • 29
1
vote
1 answer

PSake Error Executing MSBuild Command

I have 3 projects in the solution, A WPFApplication and 2 ClassLibrary projects When i build the Solution i get error below.. properties { $base_dir = resolve-path . $build_dir = "$base_dir\build" $buildartifacts_dir =…
Corku
  • 11
  • 1
  • 3