You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psake-users
What's the best way to pass arguments to my build script? I'm sure
this has come up before but am having trouble finding any information
on how to do this.
For example, say I want the pass a version number to my build script,
maybe from a continuous integration server like Team City. The only
way I can see to do it is to use and environment variable. Is that
what others are doing?
I'd like to be able to do something like:
psake .\default.ps1 -Version 1.42 -Configuration Debug -Foo Bar
Shaun Becker
unread,
Oct 19, 2009, 2:42:11 PM10/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psake...@googlegroups.com
You don't have to use environment variables. You can just use local variables:
$Version='1.42'
$Configuration='Debug'
$Foo='Bar'
psake .\default.ps1
then just reference those variables from within your script as you would any other
Thanks,
Shaun
Eric Hexter
unread,
Oct 19, 2009, 3:24:11 PM10/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psake...@googlegroups.com
In order to get those values from a CI server you would need to pass them through the powershell.exe ... right?
powershell.exe psake.exe default.ps1
How does the parameter from the CI server get into the powershell host initially?