File tree 3 files changed +20
-6
lines changed
Mono.Documentation/Updater/Frameworks
3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ namespace Mono.Documentation
3
3
{
4
4
public static class Consts
5
5
{
6
- public static string MonoVersion = "5.9.3.1 " ;
6
+ public static string MonoVersion = "5.9.3.2 " ;
7
7
public const string DocId = "DocId" ;
8
8
public const string CppCli = "C++ CLI" ;
9
9
public const string CppCx = "C++ CX" ;
Original file line number Diff line number Diff line change @@ -86,12 +86,12 @@ public void WriteToDisk (string path)
86
86
if ( string . IsNullOrWhiteSpace ( this . path ) )
87
87
return ;
88
88
89
- string outputPath = Path . Combine ( path , Consts . FrameworksIndex ) ;
89
+ string outputPath = Path . Combine ( path , Consts . FrameworksIndex ) ;
90
90
91
91
if ( ! Directory . Exists ( outputPath ) )
92
92
Directory . CreateDirectory ( outputPath ) ;
93
93
94
- foreach ( var fx in this . frameworks )
94
+ foreach ( var fx in this . frameworks )
95
95
{
96
96
XElement frameworkElement = new XElement ( "Framework" , new XAttribute ( "Name" , fx . Name ) ) ;
97
97
XDocument doc = new XDocument (
@@ -139,6 +139,20 @@ public void WriteToDisk (string path)
139
139
doc . WriteTo ( writer ) ;
140
140
}
141
141
}
142
- }
143
- }
142
+ CleanupFrameworksIndex ( outputPath ) ;
143
+ }
144
+
145
+ private void CleanupFrameworksIndex ( string outputPath )
146
+ {
147
+ var files = Directory . GetFiles ( outputPath ) ;
148
+ var frameworkNames = frameworks . ToDictionary ( item => item . Name , item => item ) ;
149
+ foreach ( var file in files )
150
+ {
151
+ if ( ! frameworkNames . ContainsKey ( Path . GetFileNameWithoutExtension ( file ) ) )
152
+ {
153
+ File . Delete ( file ) ;
154
+ }
155
+ }
156
+ }
157
+ }
144
158
}
Original file line number Diff line number Diff line change 2
2
<package >
3
3
<metadata >
4
4
<id >mdoc</id >
5
- <version >5.9.3.1 </version >
5
+ <version >5.9.3.2 </version >
6
6
<title >mdoc</title >
7
7
<authors >Microsoft</authors >
8
8
<owners >Microsoft</owners >
You can’t perform that action at this time.
0 commit comments