Red Gate forums :: View topic - Substring Variables
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Substring Variables

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
lapellaniz



Joined: 10 Jul 2013
Posts: 1

PostPosted: Wed Jul 10, 2013 4:50 pm    Post subject: Substring Variables Reply with quote

I am trying to find out if one can use regex or substring syntax when reading variables and assigning them to other variables.

I want to set the variable "RedGateWebSiteName" to be "CDS Console 4.0" where the "4.0" value comes from the "RedGateReleaseNumber" which is "4.0.1.250". I want to be able to substring a variable and assign that value to something else.

When we create a release, the value of that version includes major, minor, build (service Pack), revision. We use the major and minor only when setting names of sites. The database name includes the major, minor, build.

I can't create multiple releases with the same version value but use different package versions so I need to uniquely name the release version. I need only the first 2 numbers of the release version though to create some objects.

I am also wondering if one can set a variable defined via the deployment manager from a powershell script. I know I can read some variables but can I also set them?
Back to top
View user's profile Send private message
chirayu



Joined: 17 Sep 2012
Posts: 62

PostPosted: Fri Jul 12, 2013 11:06 am    Post subject: Reply with quote

We don't support regex or substring syntax when it comes to Deployment Manager variables. You can reference Deployment Manager variables from other variables as of version 2.0.8. So you can define '$RedGateWebsiteName' to be 'CDS Console $(RedGateReleaseNumber)' but that will create a website name ending with the release version.

If you would like to create a website with only major and minor version, you can use postDeploy.ps1 powershell script which will be run after deployment. You can manipulate the website name after deployment from within this script.

Quote:
I am also wondering if one can set a variable defined via the deployment manager from a powershell script. I know I can read some variables but can I also set them?

Sorry, we don't support setting of variables either.
_________________
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
chirayu



Joined: 17 Sep 2012
Posts: 62

PostPosted: Fri Jul 12, 2013 11:20 am    Post subject: Reply with quote

Here is our documentation on powershell scripts, if you don't already know: http://documentation.red-gate.com/display/DM2/PowerShell+scripts
_________________
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group