Closed tregusti closed 11 years ago
would the following structure work?
<on-save-action>
<working-directory>Build</working-directory>
<powershell-command>$now = Get-Date ; Add-Content build.log "Last build: $now"</powershell-command>
</on-save-action>
new branch pushed with propsed format
I gather that you by naming it <action on="save">
instead.
And also, is it necessarily a powershell command? Are you invoking powershell explicitly?
What happens if you don't have ps.exe installed?
As of now the only implenentation IOnSaveActionTaskFactory.cs is RunPowerShellCommandOnSaveActionTaskFactory.cs. It would be possible to specify another task factory via config and perhaps default to power shell. If you don't have powershell installed you will get an error in the task list with stack trace indicating that powershell is not available.
How about?
<action on="save">
<working-directory>Build</working-directory>
<type>powershell</type>
<arguments>$now = Get-Date ; Add-Content build.log "Last build: $now"</arguments>
</action>
Good. type should be optional though. And use command instead of arguments. Might be confusing with args to the command (node.exe) you want to run.
'type' or 'shell' ?
On 31 jan 2013, at 09:20, sebastianhallen notifications@github.com wrote:
How about?
Build powershell $now = Get-Date ; Add-Content build.log "Last build: $now" — Reply to this email directly or view it on GitHub.
shell makes sense.
<action on="save">
<working-directory>Build</working-directory>
<!-- explicit shell -->
<command shell="powershell">$now = Get-Date ; Add-Content build.log "Last build: $now"</arguments>
</action>
<action on="save">
<working-directory>Build</working-directory>
<!-- default shell: powershell -->
<command>$now = Get-Date ; Add-Content build.log "Last build: $now"</arguments>
</action>
How to specify explicit default shell? =)
dos? cmd? crapshell? shellfish.
On 31 jan 2013, at 13:36, sebastianhallen notifications@github.com wrote:
shell makes sense.
Build
Pun intended.