This repository was archived by the owner on Feb 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Microsoft.Content.Build.Code2Yaml.Steps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ select g
5959 {
6060 using ( var reader = new StreamReader ( outputPath ) )
6161 {
62- var oldMapping = new YamlDeserializer ( ) . Deserialize < ServiceMapping > ( reader ) ;
62+ var oldMapping = new YamlDeserializer ( ignoreUnmatched : true ) . Deserialize < ServiceMapping > ( reader ) ;
6363 foreach ( var m in oldMapping [ 0 ] . items )
6464 {
6565 if ( m . name == "Other" )
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ class Program
1818 {
1919 private static ConfigModel _config ;
2020
21- static void Main ( string [ ] args )
21+ static int Main ( string [ ] args )
2222 {
2323 if ( ! ValidateConfig ( args ) )
2424 {
25- return ;
25+ return 1 ;
2626 }
2727 var context = new BuildContext ( ) ;
2828 context . SetSharedObject ( Constants . Constants . Config , _config ) ;
@@ -38,12 +38,12 @@ static void Main(string[] args)
3838 new GenerateArticles { Generator = ArticleGeneratorFactory . Create ( _config . Language ) } ,
3939 new GenerateServiceMappingFile ( ) ) ,
4040 } ) ) ;
41- string status = "Failed" ;
41+ var status = 1 ;
4242 var watch = Stopwatch . StartNew ( ) ;
4343 try
4444 {
4545 procedure . RunAsync ( context ) . Wait ( ) ;
46- status = "Succeeded" ;
46+ status = 0 ;
4747 }
4848 catch
4949 {
@@ -53,7 +53,9 @@ static void Main(string[] args)
5353 {
5454 watch . Stop ( ) ;
5555 }
56- Console . WriteLine ( $ "{ status } in { watch . ElapsedMilliseconds } milliseconds.") ;
56+ var statusString = status == 0 ? "Succeeded" : "Failed" ;
57+ Console . WriteLine ( $ "{ statusString } in { watch . ElapsedMilliseconds } milliseconds.") ;
58+ return status ;
5759 }
5860
5961 private static bool ValidateConfig ( string [ ] args )
You can’t perform that action at this time.
0 commit comments