File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
Mono.Documentation/Updater/Frameworks Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ namespace Mono.Documentation
33{
44 public static class Consts
55 {
6- public static string MonoVersion = "5.9.3.1 " ;
6+ public static string MonoVersion = "5.9.3.2 " ;
77 public const string DocId = "DocId" ;
88 public const string CppCli = "C++ CLI" ;
99 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)
8686 if ( string . IsNullOrWhiteSpace ( this . path ) )
8787 return ;
8888
89- string outputPath = Path . Combine ( path , Consts . FrameworksIndex ) ;
89+ string outputPath = Path . Combine ( path , Consts . FrameworksIndex ) ;
9090
9191 if ( ! Directory . Exists ( outputPath ) )
9292 Directory . CreateDirectory ( outputPath ) ;
9393
94- foreach ( var fx in this . frameworks )
94+ foreach ( var fx in this . frameworks )
9595 {
9696 XElement frameworkElement = new XElement ( "Framework" , new XAttribute ( "Name" , fx . Name ) ) ;
9797 XDocument doc = new XDocument (
@@ -139,6 +139,20 @@ public void WriteToDisk (string path)
139139 doc . WriteTo ( writer ) ;
140140 }
141141 }
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+ }
144158}
Original file line number Diff line number Diff line change 22<package >
33 <metadata >
44 <id >mdoc</id >
5- <version >5.9.3.1 </version >
5+ <version >5.9.3.2 </version >
66 <title >mdoc</title >
77 <authors >Microsoft</authors >
88 <owners >Microsoft</owners >
You can’t perform that action at this time.
0 commit comments