Increment Value of CURRENT_VERSION in web configuration

bcmaningas's Avatar


09 Aug, 2017 12:14 PM

Hi -

Im trying to increase the Current_Version in our web config everytime I deploy using Octopus. Here is my script:

$webConfig = $OctopusParameters['Config_Path_Name']
$doc = (Get-Content $webConfig) -as [Xml]

##Update Current version
$date = Get-Date -Format yyyyMMdd
$version = $doc.configuration.appSettings.add | where {$_.key -eq 'CURRENT_VERSION'}
$version.value = $date + '_1'

##Save Changes

Can anyone help on how can I increase the '_1'?

  1. Paul Stovell closed this discussion on 29 Nov, 2017 05:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac