1+ param (
2+ [string ]$oldKendoVersion = " 2025.3.825" ,
3+ [string ]$newKendoVersion = " 2025.4.1111" ,
4+
5+ [string ]$oldThemesVersion = " 12.0.0" ,
6+ [string ]$newThemesVersion = " 12.0.1" ,
7+
8+ [string ]$oldCoreExportVersion = " 2025.3.812" ,
9+ [string ]$newCoreExportVersion = " 2025.3.813" ,
10+
11+ [string ]$oldWebCaptchaVersion = " 2.0.3" ,
12+ [string ]$newWebCaptchaVersion = " 2.0.4" ,
13+
14+ [string ]$oldWebSpreadsheetVersion = " 2025.3.812" ,
15+ [string ]$newWebSpreadsheetVersion = " 2025.3.813" ,
16+
17+ [string ]$oldWebPDFVersion = " 2025.3.812" ,
18+ [string ]$newWebPDFVersion = " 2025.3.813"
19+ )
20+
21+ function Replace_Reference {
22+ param (
23+ [string ]$path ,
24+ [string ]$oldReference ,
25+ [string ]$newReference
26+ )
27+
28+ (Get-Content - Path $path ) |
29+ ForEach-Object {$_ -Replace $oldReference , $newReference } |
30+ Set-Content - Path $path
31+ }
32+
33+ function Update_LayoutVersions {
34+ param (
35+ [string []]$layoutPathsToUpdate
36+ )
37+
38+
39+ foreach ($layoutPath in $layoutPathsToUpdate ) {
40+ Replace_Reference - path $layoutPath - oldReference $oldKendoVersion - newReference $newKendoVersion
41+ Replace_Reference - path $layoutPath - oldReference $oldThemesVersion - newReference $newThemesVersion
42+ }
43+
44+ }
45+
46+ function Update_ProjectVersions {
47+ param (
48+ [string []]$csprojPathsToUpdate
49+ )
50+
51+ foreach ($csprojPath in $csprojPathsToUpdate ) {
52+ Replace_Reference - path $csprojPath - oldReference $oldKendoVersion - newReference $newKendoVersion
53+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Web.Captcha"" Version="" $oldWebCaptchaVersion "" " - newReference " Include="" Telerik.Web.Captcha"" Version="" $newWebCaptchaVersion "" "
54+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Web.PDF"" Version="" $oldWebPDFVersion "" " - newReference " Include="" Telerik.Web.PDF"" Version="" $newWebPDFVersion "" "
55+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Web.Spreadsheet"" Version="" $oldWebSpreadsheetVersion "" " - newReference " Include="" Telerik.Web.Spreadsheet"" Version="" $newWebSpreadsheetVersion "" "
56+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Core.Export"" Version="" $oldCoreExportVersion "" " - newReference " Include="" Telerik.Core.Export"" Version="" $newCoreExportVersion "" "
57+ }
58+ }
59+
60+ $layoutPathsToUpdate = @ (
61+ ' Telerik.Examples.ContentSecurityPolicy\Views\Shared\_Layout.cshtml' ,
62+ ' Telerik.Examples.Mvc\Telerik.Examples.Mvc\Views\Shared\_Layout.cshtml' ,
63+ ' Telerik.Examples.RazorPages\Telerik.Examples.RazorPages\Pages\Shared\_Layout.cshtml'
64+ )
65+
66+ $csprojPathsToUpdate = @ (
67+ ' Telerik.Examples.ContentSecurityPolicy\Telerik.Examples.ContentSecurityPolicy.csproj' ,
68+ ' Telerik.Examples.RazorPages\Telerik.Examples.RazorPages\Telerik.Examples.RazorPages.csproj' ,
69+ ' Telerik.Examples.Mvc\Telerik.Examples.Mvc\Telerik.Examples.Mvc.csproj'
70+ )
71+
72+ Update_LayoutVersions - layoutPathsToUpdate $layoutPathsToUpdate
73+ Update_ProjectVersions - csprojPathsToUpdate $csprojPathsToUpdate
0 commit comments