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
7
votes
3 answers

Inject command line arguments into psake

I would like to inject command line parameters into my psake build script like: .\build.ps1 Deploy environment="development" But psake will treat every argument as a Task and will answer "task does not exists" Is it possible to inject command line…
orjan
  • 1,482
  • 1
  • 19
  • 35
7
votes
2 answers

How to use psake from a batch file?

What I want is a one file I can double-click that will run the required build process using psake. I'm new to psake and PowerShell so be gentle :-). What I have now are 3 files: File 1: Build.bat PowerShell -ExecutionPolicy Unrestricted -File…
Tim Murphy
  • 4,892
  • 4
  • 40
  • 48
6
votes
2 answers

Build step triggered by TeamCity always builds - even when there are no changes

The problem: I am setting up TeamCity as a build server for an ASP.NET MVC project. I am using Powershell with psake to run msbuild against our .csproj file and create a deployable package. From the build server, I can open up powershell, run the…
obliojoe
  • 482
  • 2
  • 13
6
votes
0 answers

Verbose preference does not work

I would like to use the Verbose preference ($VerbosePreference) inside my build script. I'm using the Chocolatey version of psake (so calling the batch file) and I cannot get it to work well at all. The -Verbose switch works not at all. I ended up…
Greg McGuffey
  • 3,116
  • 3
  • 38
  • 58
6
votes
1 answer

Psake ignores properties and parameters

Using psake 4.5.0 I've tried to run my default.ps1 file many different ways, passing both -properties and -parameters, but those values are just ignored in the root-scope of the .ps1-script. Execute relative (with psake in a…
Seb Nilsson
  • 26,200
  • 30
  • 103
  • 130
6
votes
1 answer

How to use -parameters and -properties in psake correctly?

I have the following psake script properties { $ApplicationName = "test" $ApplicationPath = "c:\this\is\$ApplicationName" } Task test { "ApplicationName = $ApplicationName" "ApplicationPath = $ApplicationPath" } I want to pass only…
samy
  • 14,832
  • 2
  • 54
  • 82
6
votes
2 answers

Where does Powershell and PSake execute msbuild from?

While making a build automation I came across an issue. Along with upgrading Visual Studio 2013, the path to MSBuild has moved as described here http://timrayburn.net/blog/visual-studio-2013-and-msbuild/ I've updated my system path to point to this…
Rasmus Christensen
  • 8,321
  • 12
  • 51
  • 78
5
votes
1 answer

How to pass properties to chocolatey version of psake

I've installed psake using Chocolatey. This allows you to run psake using the psake command from either powershell or the windows command line. However when I try and pass properties to psake using the following command psake TestProperties…
Castrohenge
  • 8,525
  • 5
  • 39
  • 66
5
votes
1 answer

Can I set visual studio to use psake when building?

I would like to set visual studio to use Psake build by default when building. Is this possible slash more effort than its worth?
George Mauer
  • 117,483
  • 131
  • 382
  • 612
5
votes
2 answers

How to run Code-First Migrations from a psake build?

I can type Update-Database, Enable-Migrations etc, from Package Manager Console and it works fine. If I need to do the same from a regular powershell session, or in a psake build file, then how do I do it? I tried importing the module…
Zasz
  • 12,330
  • 9
  • 43
  • 63
4
votes
0 answers

How to override array parameter in psake script

Let us assume my my psake default.ps1 looks like this : properties { $dllsToMerge= @("x.dll","y.dll")} task ilmerge { exec { &ilmerge -dll $dllsToMerge -out single.dll} } now when running this task at some times I would like to change which…
Perpetualcoder
  • 13,501
  • 9
  • 64
  • 99
4
votes
2 answers

PowerShell 2.0 - Running scripts for the command line call vs. from the ISE

After writing deployment scripts from within the ISE, we need our continuous integration (CI) server to be able to run them automatically, i.e. from the command line or via a batch file. I have noticed some significant differences between the…
Romain
  • 2,318
  • 1
  • 23
  • 31
4
votes
2 answers

Scope of functions defined in modules when used in psake tasks

I have a psake Task looking something like below (this is simplified for clarity): Task Invoke-Deploy { Import-Module "somefunctions.psm1" Import-Module "morefunctions.psm1" Set-Something #This is a function defined in…
jamiet
  • 10,501
  • 14
  • 80
  • 159
4
votes
2 answers

Why doesn't psake evaluate my property the way I expect?

I have a simple psake script: properties { $SolutionDir = "SOLUTIONDIR" # Resolve-Path ".\src" $Config = "Debug" $DeployBaseDir = "$SolutionDir\RMSS.Setup.WiX\bin\$Config" $InstallerName = "RMSForMoversSuite_2_0_0" } task default…
Josh Kodroff
  • 27,301
  • 27
  • 95
  • 148
3
votes
2 answers

How would you deploy this .net stack?

I have a .net app which has an MVC3 front end and 2 windows services. It all depends on 2 RavenDB installations which can either be ran as windows services or IIS - I'm not bothered here. The services are built using TopShelf and testing is done…
user156888