Ejemplo n.º 1
0
        public static async Task Main(string[] args)
        {
            var client = new SecretClient(
                vaultUri: new Uri("https://roslyninfra.vault.azure.net:443"),
                credential: new DefaultAzureCredential(includeInteractiveCredentials: true));

            using var devdivConnection = new AzDOConnection("https://devdiv.visualstudio.com/DefaultCollection", "DevDiv", "Roslyn-Signed", client, "vslsnap-vso-auth-token");
            using var dncengConnection = new AzDOConnection("https://dnceng.visualstudio.com/DefaultCollection", "internal", "dotnet-roslyn CI", client, "vslsnap-build-auth-token");

            if (args.Length == 0)
            {
                args = await GetDefaultVSBranches(devdivConnection);
            }

            foreach (var branch in args)
            {
                WriteHeader(branch);
                try
                {
                    await WriteRoslynBuildInfo(branch, devdivConnection, dncengConnection);
                }
                catch (Exception ex)
                {
                    WriteError(ex);
                }
            }
        }
Ejemplo n.º 2
0
        private static async Task <string[]> GetDefaultVSBranches(AzDOConnection devdiv)
        {
            Console.WriteLine("Finding branches in the VS repository. This may take a while...");
            Console.WriteLine("You can skip this specifying branches as command line arguments.");
            Console.WriteLine();

            var vsRepository = await devdiv.GitClient.GetRepositoryAsync("DevDiv", "VS");

            var branches = await devdiv.GitClient.GetBranchesAsync(vsRepository.Id);

            // Get the top 4 branches. In theory:
            //   1. main
            //   2. next version
            //   3. current version
            //   4. previous version
            return((from b in branches
                    where b.Name == "main" || b.Name.StartsWith("rel/d")
                    let ver = GetVersionNumber(b)
                              orderby ver descending
                              select b.Name).Take(4).ToArray());