Wednesday, April 23, 2014

Scripted MSDeploy Utilizes locally published "EA.Website.deploy.cmd"


For any interested…


This script uses MSDeploy  & utilizes the locally published "EA.Website.deploy.cmd"

(see notes in file below)

Since the .zip file is auto-extracted to a rather lengthy virtual path, I thought I'd make a note here, before anyone goes to the trouble of creating one, like I did.

My local auto-extracted IIS Virtual path turned out to be:

C:\inetpub\EA.Website\Src\Web\bin\DeploymentPackage

 

One remaining step, not included in this script, would be to overwrite the freshly published web.config, etc. with a saved configuration file.

 

REM ------------------------------------------------------------------------------------------------------------------------------------

REM NOTE: http://blog.winhost.com/using-msdeploy-to-publish-your-site/

REM NOTE: http://technet.microsoft.com/en-us/library/dd569001(v=ws.10).aspx

REM NOTE: C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy.exe

REM NOTE: This script uses MSDeploy  & utilizes the locally published "EA.Website.deploy.cmd"

REM EUREKA !!!

@ECHO NOTE: You must have MSdeploy v3 installed to utilize this script.

@ECHO NOTE: You must create a local IIS website with appropriate application pool and binding for "mobileweb.com"

@ECHO NOTE: You must create a local IIS physical folder with appropriate directory ACLs for mobileweb.com

@ECHO NOTE: You must create a local host file entry with appropriate loopback address for mobileweb.com

@ECHO NOTE: Beginning local MSdeployment to IIS website - mobileweb.com

CD C:\EA.Website\Src\Web\obj\Debug\Package

RENAME EA.Website.zip EA-Website.zip

CD "C:\Program Files (x86)\IIS\Microsoft Web Deploy V3"

msdeploy.exe -verb:sync -source:iisApp=C:\inetpub -dest:package=C:\EA.Website\Src\Web\obj\Debug\Package\EA-Website.zip

iisreset /noforce

@ECHO NOTE: Remember to update your local web.configs in the deployment directory !

@ECHO NOTE: Press a key to open http://mobileweb.com - without [www]

pause

@ECHO off

@setlocal

set url="mobileweb.com"

start "%ProgramFiles%\Internet Explorer\iexplore.exe" http://%url%

exit

 

 -cheers

No comments:

Post a Comment