File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,37 @@ function Update-Icon {
31
31
$xml.Save ($Path )
32
32
}
33
33
34
+ function Update-Versions {
35
+ param (
36
+ [string ]$Path
37
+ )
38
+ $Path = Resolve-Path $Path
39
+ [xml ] $xml = Get-Content $Path
40
+
41
+ foreach ($dependency in $xml.package.metadata.dependencies.group.dependency ){
42
+ if ($dependency.id -eq " MaterialDesignColors" ) {
43
+ $dependency.version = Get-VersionString $MDIXColorsVersion
44
+ } elseif ($dependency.id -eq " MaterialDesignThemes" ) {
45
+ $dependency.version = Get-VersionString $MDIXVersion
46
+ }
47
+ }
48
+ $xml.Save ($Path )
49
+ }
50
+
51
+ function Get-VersionString {
52
+ param (
53
+ [string ]$Version
54
+ )
55
+
56
+ $callback = {
57
+ [int ]$args [0 ].Value + 1
58
+ }
59
+
60
+ $re = [regex ]" ^\d+"
61
+ $nextVersion = $re.Replace ($Version , $callback )
62
+ return " [$Version ,$nextVersion )"
63
+ }
64
+
34
65
function New-Nuget {
35
66
param (
36
67
[string ]$NuSpecPath ,
@@ -44,6 +75,10 @@ function New-Nuget {
44
75
45
76
Push-Location " $ ( Join-Path $PSScriptRoot " .." ) "
46
77
78
+ Update-Versions .\MaterialDesignColors.nuspec
79
+ Update-Versions .\MaterialDesignThemes.nuspec
80
+ Update-Versions .\MaterialDesignThemes.MahApps.nuspec
81
+
47
82
New-Nuget .\MaterialDesignColors.nuspec $MDIXColorsVersion
48
83
New-Nuget .\MaterialDesignThemes.nuspec $MDIXVersion
49
84
New-Nuget .\MaterialDesignThemes.MahApps.nuspec $MDIXMahAppsVersion
You can’t perform that action at this time.
0 commit comments