.net WebDeploy is there any way to run command/script on the target machine after deploy
Asked Answered
W

1

0

I have and .net/angular2 application, I'm publishing with WebDeploy. But when the publish finish I wanna run some command on the target machine like

npm install
npm run tsc

There is a way to do that?

Whinchat answered 12/9, 2016 at 16:5 Comment(0)
U
2

You should be able to use the postSync argument:

msdeploy -verb:sync -source:contentPath="C:\Test1" -dest:contentPath="C:\Test2" -postSync:runcommand="c:\MyBatchFile.bat" 

https://technet.microsoft.com/en-us/library/dd569089(v=ws.10).aspx

Ushaushant answered 27/9, 2016 at 11:3 Comment(1)
Hi @chief7, can this command be added to the .pubxml file when publishing, instead of having to publish via command-line?Masonite

© 2022 - 2024 — McMap. All rights reserved.