2016-02-15 10:07:39 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
										 
									
								 
							
							
								 using  System ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-12 10:11:30 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  System.IO ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-16 14:39:02 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  System.Net.Http ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  System.Text ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-15 10:07:39 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  Microsoft.DotNet.Cli.Build.Framework ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  Microsoft.WindowsAzure.Storage ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  Microsoft.WindowsAzure.Storage.Blob ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-12 10:11:30 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								using  static  Microsoft . DotNet . Cli . Build . Framework . BuildHelpers ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								namespace  Microsoft.DotNet.Cli.Build 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								    public  static  class  PublishTargets 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        private  static  AzurePublisher  AzurePublisherTool  {  get ;  set ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        private  static  DebRepoPublisher  DebRepoPublisherTool  {  get ;  set ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 14:52:41 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        private  static  string  Channel  {  get ;  set ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        private  static  string  CliVersion  {  get ;  set ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        private  static  string  CliNuGetVersion  {  get ;  set ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 22:22:22 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        private  static  string  SharedFrameworkNugetVersion  {  get ;  set ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  InitPublish ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool  =  new  AzurePublisher ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            DebRepoPublisherTool  =  new  DebRepoPublisher ( Dirs . Packages ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 17:13:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            CliVersion  =  c . BuildContext . Get < BuildVersion > ( "BuildVersion" ) . SimpleVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            CliNuGetVersion  =  c . BuildContext . Get < BuildVersion > ( "BuildVersion" ) . NuGetVersion ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            SharedFrameworkNugetVersion  =  c . BuildContext . Get < string > ( "SharedFrameworkNugetVersion" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 14:52:41 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            Channel  =  c . BuildContext . Get < string > ( "Channel" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [ Target ( nameof ( PrepareTargets . Init ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        nameof ( PublishTargets . InitPublish ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-24 10:50:29 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        nameof ( PublishTargets . PublishArtifacts ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        nameof ( PublishTargets . TriggerDockerHubBuilds ) ) ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 14:52:41 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Environment("PUBLISH_TO_AZURE_BLOB", "1", "true")]  // This is set by CI systems 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-12 10:11:30 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  Publish ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-16 11:39:17 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-18 02:23:24 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [ Target ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishInstallerFilesToAzure ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishArchivesToAzure ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishDebFilesToDebianRepo ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishLatestCliVersionTextFile ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishLatestSharedFrameworkVersionTextFile ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-30 17:59:16 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCoreHostPackages ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCliVersionBadge ) ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishArtifacts ( BuildTargetContext  c )  = >  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [ Target ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishSharedHostInstallerFileToAzure ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishSharedFrameworkInstallerFileToAzure ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishSdkInstallerFileToAzure ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCombinedFrameworkSDKHostInstallerFileToAzure ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCombinedFrameworkHostInstallerFileToAzure ) ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishInstallerFilesToAzure ( BuildTargetContext  c )  = >  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [ Target ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCombinedHostFrameworkArchiveToAzure ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-04 20:13:13 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCombinedHostFrameworkSdkArchiveToAzure ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-24 13:01:52 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishCombinedFrameworkSDKArchiveToAzure ) , 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-04 20:13:13 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishTargets . PublishSDKSymbolsArchiveToAzure ) ) ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishArchivesToAzure ( BuildTargetContext  c )  = >  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [ Target ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishSdkDebToDebianRepo ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishSharedFrameworkDebToDebianRepo ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            nameof ( PublishSharedHostDebToDebianRepo ) ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishDebFilesToDebianRepo ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-12 10:11:30 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCliVersionBadge ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 17:13:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  versionBadge  =  c . BuildContext . Get < string > ( "VersionBadge" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  latestVersionBadgeBlob  =  $"{Channel}/Binaries/Latest/{Path.GetFileName(versionBadge)}" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  versionBadgeBlob  =  $"{Channel}/Binaries/{CliNuGetVersion}/{Path.GetFileName(versionBadge)}" ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 17:13:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishFile ( versionBadgeBlob ,  versionBadge ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishFile ( latestVersionBadgeBlob ,  versionBadge ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-30 17:59:16 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCoreHostPackages ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-30 18:02:29 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            foreach  ( var  file  in  Directory . GetFiles ( Dirs . Corehost ,  "*.nupkg" ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-30 17:59:16 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                var  hostBlob  =  $"{Channel}/Binaries/{CliNuGetVersion}/{Path.GetFileName(file)}" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                AzurePublisherTool . PublishFile ( hostBlob ,  file ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                Console . WriteLine ( $"Publishing package {hostBlob} to Azure." ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-30 17:59:16 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-24 13:01:52 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Windows)] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSharedHostInstallerFileToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "SharedHostInstallerFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-24 13:01:52 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            if  ( CurrentPlatform . Current  = =  BuildPlatform . Windows ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                installerFile  =  Path . ChangeExtension ( installerFile ,  "msi" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishInstallerFileAndLatest ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSharedFrameworkInstallerFileToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  SharedFrameworkNugetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "SharedFrameworkInstallerFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishInstallerFileAndLatest ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSdkInstallerFileToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 17:13:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "SdkInstallerFile" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishInstallerFileAndLatest ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCombinedFrameworkHostInstallerFileToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  SharedFrameworkNugetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "CombinedFrameworkHostInstallerFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishInstallerFileAndLatest ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-12 10:11:30 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:31:16 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX)] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCombinedFrameworkSDKHostInstallerFileToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-16 18:16:51 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "CombinedFrameworkSDKHostInstallerFile" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishInstallerFileAndLatest ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-24 13:01:52 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-26 14:33:40 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Windows)] 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-24 13:01:52 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCombinedFrameworkSDKArchiveToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  archiveFile  =  c . BuildContext . Get < string > ( "CombinedFrameworkSDKCompressedFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishArchiveAndLatest ( archiveFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCombinedHostFrameworkSdkArchiveToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  archiveFile  =  c . BuildContext . Get < string > ( "CombinedFrameworkSDKHostCompressedFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 17:13:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishArchiveAndLatest ( archiveFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-04 20:13:13 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSDKSymbolsArchiveToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  archiveFile  =  c . BuildContext . Get < string > ( "SdkSymbolsCompressedFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishArchiveAndLatest ( archiveFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishCombinedHostFrameworkArchiveToAzure ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  SharedFrameworkNugetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  archiveFile  =  c . BuildContext . Get < string > ( "CombinedFrameworkHostCompressedFile" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 17:13:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishArchiveAndLatest ( archiveFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishLatestCliVersionTextFile ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  osname  =  Monikers . GetOSShortName ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  latestCliVersionBlob  =  $"{Channel}/dnvm/latest.{osname}.{CurrentArchitecture.Current}.version" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  latestCliVersionFile  =  Path . Combine ( Dirs . Stage2 ,  "sdk" ,  version ,  ".version" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishFile ( latestCliVersionBlob ,  latestCliVersionFile ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-07 12:20:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishLatestSharedFrameworkVersionTextFile ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-08 23:33:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  SharedFrameworkNugetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  osname  =  Monikers . GetOSShortName ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  latestSharedFXVersionBlob  =  $"{Channel}/dnvm/latest.sharedfx.{osname}.{CurrentArchitecture.Current}.version" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  latestSharedFXVersionFile  =  Path . Combine ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                Dirs . Stage2 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                "shared" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                CompileTargets . SharedFrameworkName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                version , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                ".version" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            AzurePublisherTool . PublishFile ( latestSharedFXVersionBlob ,  latestSharedFXVersionFile ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSdkDebToDebianRepo ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  packageName  =  Monikers . GetSdkDebianPackageName ( c ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-08 13:39:41 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "SdkInstallerFile" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  uploadUrl  =  AzurePublisherTool . CalculateInstallerUploadUrl ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-08 23:33:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            DebRepoPublisherTool . PublishDebFileToDebianRepo ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                packageName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                version , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                uploadUrl ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-08 23:33:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSharedFrameworkDebToDebianRepo ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  SharedFrameworkNugetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-05 18:48:02 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  packageName  =  Monikers . GetDebianSharedFrameworkPackageName ( c ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "SharedFrameworkInstallerFile" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  uploadUrl  =  AzurePublisherTool . CalculateInstallerUploadUrl ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            DebRepoPublisherTool . PublishDebFileToDebianRepo ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                packageName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                version , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                uploadUrl ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [BuildPlatforms(BuildPlatform.Ubuntu)] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  PublishSharedHostDebToDebianRepo ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  version  =  CliNuGetVersion ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-05 18:48:02 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  packageName  =  Monikers . GetDebianSharedHostPackageName ( c ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  installerFile  =  c . BuildContext . Get < string > ( "SharedHostInstallerFile" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            var  uploadUrl  =  AzurePublisherTool . CalculateInstallerUploadUrl ( installerFile ,  Channel ,  version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								            DebRepoPublisherTool . PublishDebFileToDebianRepo ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 15:28:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                packageName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                version , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-23 16:37:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								                uploadUrl ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 14:14:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-16 14:39:02 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Target] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Environment("DOCKER_HUB_REPO")] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        [Environment("DOCKER_HUB_TRIGGER_TOKEN")] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        public  static  BuildTargetResult  TriggerDockerHubBuilds ( BuildTargetContext  c ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            string  dockerHubRepo  =  Environment . GetEnvironmentVariable ( "DOCKER_HUB_REPO" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            string  dockerHubTriggerToken  =  Environment . GetEnvironmentVariable ( "DOCKER_HUB_TRIGGER_TOKEN" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            Uri  baseDockerHubUri  =  new  Uri ( "https://registry.hub.docker.com/u/" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            Uri  dockerHubTriggerUri ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            if  ( ! Uri . TryCreate ( baseDockerHubUri ,  $"{dockerHubRepo}/trigger/{dockerHubTriggerToken}/" ,  out  dockerHubTriggerUri ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                return  c . Failed ( "Invalid DOCKER_HUB_REPO and/or DOCKER_HUB_TRIGGER_TOKEN" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            c . Info ( $"Triggering automated DockerHub builds for {dockerHubRepo}" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            using  ( HttpClient  client  =  new  HttpClient ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                StringContent  requestContent  =  new  StringContent ( "{\"build\": true}" ,  Encoding . UTF8 ,  "application/json" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                try 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                    HttpResponseMessage  response  =  client . PostAsync ( dockerHubTriggerUri ,  requestContent ) . Result ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                    if  ( ! response . IsSuccessStatusCode ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                        StringBuilder  sb  =  new  StringBuilder ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                        sb . AppendLine ( $"HTTP request to {dockerHubTriggerUri.ToString()} was unsuccessful." ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                        sb . AppendLine ( $"Response status code: {response.StatusCode}. Reason phrase: {response.ReasonPhrase}." ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                        sb . Append ( $"Respone content: {response.Content.ReadAsStringAsync().Result}" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                        return  c . Failed ( sb . ToString ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                catch  ( AggregateException  e ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                    return  c . Failed ( $"HTTP request to {dockerHubTriggerUri.ToString()} failed. {e.ToString()}" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								            return  c . Success ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-12 10:11:30 -08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
								
									
								 
							
							
								}