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
0
votes
1 answer

Running PSAKE script from the command line

I'm creating a batch file to execute my psake builds while integrating with teamcity and the TFS Powershell commandlets from TFPT and have come up with the following: @ECHO OFF SET COMMAND_TO_EXECUTE= SET COMMAND_TO_EXECUTE=%COMMAND_TO_EXECUTE% "&…
Jimit
  • 765
  • 2
  • 10
  • 18
0
votes
3 answers

How to Continuously Integrate a Powershell script

I have written a script which builds out the various IIS sites that a team of developers will use, ideally when a new Dev comes online, to build their IIS they would checkout our get repo then run the script. In the longer term this script would…
0
votes
1 answer

Copy-Item is not working

I have a script that is finding a few files and the copying them. This is part of a psake build script. The command is: Get-ChildItem -Path "$sourceFolder" -Include "*.ispac" -Recurse ` | Select-Object -ExpandProperty FullName ` | Copy-Item…
Greg McGuffey
  • 3,116
  • 3
  • 38
  • 58
0
votes
1 answer

How to ignore Robocopy access denied errors in psake?

I am writing psake task for copying a folder to another folder as below. task -name CopyComponentToBundle -description "Copy the component to bundle" -action { Write "Component source is $ComponentPath" Write "Component Destination is…
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
0
votes
1 answer

Select only first row from output

How can i only select the first row (Name) from this Output in powershell? Output The Code is this one: 1. Import-Module "C:\CMI\Entwicklung\MetaTool\packages\psake.4.5.0\tools\psake.psm1" 2. invoke-psake -buildFile…
0
votes
1 answer

Deploy to Azure Website from Appveyor

I have a web application that I am trying to deploy from appveyor to an azure website. I have the build configured in appveyor to use a psake script. From the appveyor documentation, it seems that I need to select "Package Web Applications for Web…
0
votes
0 answers

Download nuget.exe using Powershell

Can someone provide an example powershell script to bootstrap (aka download) NuGet.exe for a fresh system that only has the .NET 4.5 SDK installed? I would like to use psake to automate my entire build process and would prefer to not upload…
Johnny 5
  • 499
  • 5
  • 10
0
votes
1 answer

How can I check for repo status using posh-git in a PowerShell function?

We have a psake orchestration that prompts a user with the following message before calling 'git clean -xdf': About to delete all untracked files. Press 'Y' to continue or any other key to cancel. We'd like to show this prompt ONLY if there are…
bopapa_1979
  • 8,949
  • 10
  • 51
  • 76
0
votes
2 answers

How do you data drive task dependencies via properties in psake?

In MSBuild you can data drive target dependencies by passing a item group into a target, like so:
Jordan
  • 2,811
  • 2
  • 20
  • 21
0
votes
1 answer

Powershell runs all external commands in a new window, omitting output

As described in the subject, my powershell environment is executing all external commands in separate windows. In a typical test run of my team's build script, this includes things like: nuget.exe running for each project in a sln nunit test…
0
votes
2 answers

Build C# .NET 3.5 project fails with psake but succeeded with msbuild

I'm trying to create build scripts with psake for our company C# project in .NET 3.5, but when I run it, it fails with errors default parameter specifiers are not permitted I google out and it looks like it is a problem of .NET 3.5 that does not…
kraklin
  • 526
  • 1
  • 4
  • 7
0
votes
1 answer

msdeploy via powershell and psake fails

So I'm trying to use powershell and psake for my build and deployment. I've tried without any success to call the following psake task. Exec { msdeploy.exe…
Tim Butterfield
  • 565
  • 5
  • 24
0
votes
1 answer

Re-installing an NServiceBus endpoint stops the service

When I re-run my psake-based deploy process, my NServiceBus (3.3.0) endpoint does not resume processing messages. Under services.msc, the Status is blank. Here's my psake script (with irrelevant stuff removed): function…
Josh Kodroff
  • 27,301
  • 27
  • 95
  • 148
0
votes
1 answer

Override properties when including a psake script in an other psake script

I am new to psake and I have this issue: I have 2 psake scripts: (1): base_tasks.ps1: properties{ $a = "hello" $b = "hi" } task One{ Write-Host $a } (2): install.ps1 Include .\base_tasks.ps1 properties{ $a = "Goodbye" $b =…
Piguy
  • 465
  • 1
  • 5
  • 11
-1
votes
1 answer

Psake nested build does not fail

I have a fairly simple Psake build script (default.ps1) that calls Invoke-Psake from within one of the tasks. Something like this: (default.ps1) . .\utilities.ps1 properties { ...define some properties } task default -depends Step1 task Step1…
squillman
  • 13,363
  • 3
  • 41
  • 60
1 2 3 4 5 6
7