Setting Variables on PreDeploy.ps1 for publishing
mbre
Posts: 7
Hi Team,
Is it possible and if yes then how can I override eg the "RedGateWebSiteName" variable in my predeploy.ps1 file?
Our Website name is depend on the date of publish and because of that I need to set it dynamically.
Thanks,
Markus
Is it possible and if yes then how can I override eg the "RedGateWebSiteName" variable in my predeploy.ps1 file?
Our Website name is depend on the date of publish and because of that I need to set it dynamically.
Thanks,
Markus
Comments
But if I set the Variable in powershell, it seems to me that value is lost when completing the script. Could this be correct?
Regards,
Markus
It's currently not possible to modify variable values from pre-deploy powershell scripts.
So we understand the scenario, can I ask why you need to set the website name depending on the date of publish?
Best regards,
Chris
Redgate Software
We want to deploy an internal API WCF service and for reverse compatibility when deploying the service with breaking changes, we use the current date in publish path (eg http://demoserver/2013/05/07/service.svc).
So I wanted to override the publish path in PreDeploy.ps1 depending on current date.
I've now disabled automatic IIS app creation of deployment manager and perform the Deployment of application in Deploy.ps1 completely on my own.
Regards,
Markus