File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,16 @@ function Update-JavaScriptLibrary ($name, $newVersion) {
152152 mv $oldVersionFolder.Name $newVersionFolder
153153
154154 $licenseFile = Get-Item " $newVersionFolder \LICENSE.htm"
155- (Get-Content $licenseFile ) | % { $_ -replace $oldVersion , $newVersion } | Set-Content $licenseFile
155+ (Get-Content $licenseFile ) | % { $_ -replace $oldVersion.Replace ( ' . ' , ' \. ' ) , $newVersion } | Set-Content $licenseFile
156156
157157 $dnnFile = Get-Item " $newVersionFolder \*.dnn"
158- (Get-Content $dnnFile ) | % { $_ -replace $oldVersion , $newVersion } | Set-Content $dnnFile
158+ (Get-Content $dnnFile ) | % { $_ -replace $oldVersion.Replace (' .' , ' \.' ), $newVersion } | Set-Content $dnnFile
159+
160+ $oldParsedVersion = [System.Version ]::Parse($oldVersion )
161+ $newParsedVersion = [System.Version ]::Parse($newVersion )
162+ $oldParsedFolder = " $ ( $oldParsedVersion.Major.ToString (' 0#' )) _$ ( $oldParsedVersion.Minor.ToString (' 0#' )) _$ ( $oldParsedVersion.Build.ToString (' 0#' )) "
163+ $newParsedFolder = " $ ( $newParsedVersion.Major.ToString (' 0#' )) _$ ( $newParsedVersion.Minor.ToString (' 0#' )) _$ ( $newParsedVersion.Build.ToString (' 0#' )) "
164+ (Get-Content $dnnFile ) | % { $_ -replace $oldParsedFolder , $newParsedFolder } | Set-Content $dnnFile
159165
160166 git add - A
161167 git -- no- pager diff -- cached -- find-renames = 10 %
You can’t perform that action at this time.
0 commit comments