File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ public static async Task<int> GoAsync(string[] args)
99
99
return 2 ;
100
100
}
101
101
102
-
103
-
104
102
CopyBreakingChangesDocs ( ) ;
103
+ CopyReleaseNotes ( ) ;
105
104
DeleteExistingDocsAndSwap ( ) ;
106
105
107
106
Console . ForegroundColor = ConsoleColor . Green ;
@@ -144,6 +143,26 @@ private static void CopyBreakingChangesDocs()
144
143
}
145
144
}
146
145
146
+ private static void CopyReleaseNotes ( )
147
+ {
148
+ var outputDir = new DirectoryInfo ( Program . OutputDirPath ) ;
149
+ var tmpDir = new DirectoryInfo ( Program . TmpOutputDirPath ) ;
150
+ if ( ! outputDir . Exists )
151
+ throw new Exception ( $ "Docs folder should be present in repos but does not exist at: { Program . OutputDirPath } ") ;
152
+ if ( ! tmpDir . Exists )
153
+ throw new Exception ( $ "Temp docs folder should be present in repos after generation ran but does not exist at: { Program . TmpOutputDirPath } ") ;
154
+
155
+ foreach ( var dir in outputDir . EnumerateDirectories ( ) )
156
+ {
157
+ if ( ! dir . Name . EndsWith ( "release-notes" ) )
158
+ continue ;
159
+
160
+ var newLocation = Path . Combine ( tmpDir . FullName , dir . Name ) ;
161
+ Console . WriteLine ( $ "Moving { dir . Name } to: { tmpDir . FullName } ") ;
162
+ dir . MoveTo ( newLocation ) ;
163
+ }
164
+ }
165
+
147
166
private static void DeleteExistingDocsAndSwap ( )
148
167
{
149
168
var outputDir = new DirectoryInfo ( Program . OutputDirPath ) ;
You can’t perform that action at this time.
0 commit comments