Setting Variables on PreDeploy.ps1 for publishing

mbrembre Posts: 7
edited May 7, 2013 9:14AM in Deployment Manager
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

Comments

  • I've found out that I can read variables in powershell script, but I can't modify them. For our scenario it is needed to change the Output Directory for package (eg in PreDeploy.ps1).

    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
  • csmithcsmith Posts: 140 Bronze 1
    Hi 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
    Divisional Development Lead
    Redgate Software
  • Hi Chris,

    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
Sign In or Register to comment.