{"issue":{"state":"open","created_at":"2011-12-12T20:53:17Z","updated_at":"2011-12-12T23:46:13Z","comments":8,"user":{"gravatar_id":"14c01896146a17b7ac0498d593d820f9","id":1258583,"url":"https://api.github.com/users/patrickfarry","avatar_url":"https://secure.gravatar.com/avatar/14c01896146a17b7ac0498d593d820f9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"patrickfarry"},"body":"I wrote a small extension task that embeds a powershell script. We will be using it for complex build tasks. The script can access the Nant project object (get and set properties etc.). It also supports named powershell runspaces - so you can continue executing a script after setting up the parameters.\r\n\r\nAnyone interested in this? I haven't contributed anything before - not sure if it is worthy or how to go about it.\r\n\r\nHere is an example of the task in NAnt\r\n\r\n<?xml version=\"1.0\"?>\r\n<project name=\"My project\" default=\"build\" basedir=\".\">\r\n<description>The top level build file.</description>\r\n\r\n<property name=\"tmpLog\" value=\"c:\\tempSVNUpdate\" />\r\n<property name=\"results\" value=\"Unknown\" />\r\n\r\n<target name=\"build\" >\r\n<powershell property=\"results\" taskvar = \"myvar\" runspace=\"myrunspace\">\r\n$var = \"this is the script\"\r\n$myvar.Properties[\"tmpLog\"] = \"Hello\"\r\n$myvar.Project.ProjectName\r\n</powershell>\r\n<powershell property=\"results\">\r\n$var = \"running from a new runspace\"\r\n$var\r\n</powershell>\r\n<powershell property=\"results\" runspace=\"myrunspace\">\r\n$var\r\n</powershell>\r\n\r\n</target>\r\n</project>\r\n","assignee":null,"id":2528372,"labels":[],"number":5,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Powershell script task","html_url":"https://github.com/nant/nantcontrib/issues/5","closed_at":null,"url":"https://api.github.com/repos/nant/nantcontrib/issues/5","milestone":null},"action":"created","comment":{"created_at":"2011-12-12T23:46:13Z","updated_at":"2011-12-12T23:46:13Z","user":{"gravatar_id":"14c01896146a17b7ac0498d593d820f9","id":1258583,"url":"https://api.github.com/users/patrickfarry","avatar_url":"https://secure.gravatar.com/avatar/14c01896146a17b7ac0498d593d820f9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"patrickfarry"},"body":"Will do.  I got mail from Dominik. I will be upgrading what I did to fit the  \nproject and will get back to you guys.\n\nConnected by DROID on Verizon Wireless\n\n-----Original message-----\nFrom: Ryan Boggs  \n<reply+i-2528372-b66055b90339b6ceec05f59b133e8fb0fc42c4db-1258583@reply.githu \nb.com>\nTo: patrickfarry <patrick.farry@endicia.com>\nSent: Mon, Dec 12, 2011 23:14:02 GMT+00:00\nSubject: Re: [nantcontrib] Powershell script task (#5)\n\nI like the idea.  If you are wanting to submit this task to NAntContrib, I  \nwould ask if you could submit this via a pull request, details can be [found  \nhere](http://help.github.com/send-pull-requests/).\n\nDocumentation for this task would also be very helpful. :)\n\n--- \nReply to this email directly or view it on GitHub:\nhttps://github.com/nant/nantcontrib/issues/5#issuecomment-3114801","id":3116089,"url":"https://api.github.com/repos/nant/nantcontrib/issues/comments/3116089"}}