Пример #1
0
        public static BuildTargetResult PublishSharedFrameworkVersionBadge(BuildTargetContext c)
        {
            var versionBadge     = c.BuildContext.Get <string>("VersionBadge");
            var versionBadgeBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(versionBadge)}";

            AzurePublisherTool.PublishFile(versionBadgeBlob, versionBadge);
            return(c.Success());
        }
Пример #2
0
        private static void DownloadPackagesForPush(string pathToDownload)
        {
            AzurePublisherTool.DownloadFiles(pathToDownload, ".nupkg", Dirs.PackagesNoRID);

            string pushedSemaphore = Path.Combine(Dirs.PackagesNoRID, PackagePushedSemaphoreFileName);

            File.WriteAllText(pushedSemaphore, $"Packages pushed for build {pathToDownload}");
            AzurePublisherTool.PublishFile(pathToDownload + "/" + PackagePushedSemaphoreFileName, pushedSemaphore);
        }
Пример #3
0
        public static BuildTargetResult PublishCliVersionBadge(BuildTargetContext c)
        {
            var versionBadge           = c.BuildContext.Get <string>("VersionBadge");
            var latestVersionBadgeBlob = $"{Channel}/Binaries/Latest/{Path.GetFileName(versionBadge)}";
            var versionBadgeBlob       = $"{Channel}/Binaries/{CliNuGetVersion}/{Path.GetFileName(versionBadge)}";

            AzurePublisherTool.PublishFile(versionBadgeBlob, versionBadge);
            AzurePublisherTool.PublishFile(latestVersionBadgeBlob, versionBadge);
            return(c.Success());
        }
Пример #4
0
        public static BuildTargetResult PublishCoreHostPackages(BuildTargetContext c)
        {
            foreach (var file in Directory.GetFiles(Dirs.Corehost, "*.nupkg"))
            {
                var hostBlob = $"{Channel}/Binaries/{CliNuGetVersion}/{Path.GetFileName(file)}";
                AzurePublisherTool.PublishFile(hostBlob, file);
            }

            return(c.Success());
        }
Пример #5
0
        public static BuildTargetResult PublishCoreHostPackages(BuildTargetContext c)
        {
            foreach (var file in Directory.GetFiles(Dirs.CorehostLocalPackages, "*.nupkg"))
            {
                var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
                AzurePublisherTool.PublishFile(hostBlob, file);
                Console.WriteLine($"Publishing package {hostBlob} to Azure.");
            }

            return(c.Success());
        }
Пример #6
0
        public static BuildTargetResult PublishLatestCliVersionTextFile(BuildTargetContext c)
        {
            var version = CliNuGetVersion;

            var osname = Monikers.GetOSShortName();
            var latestCliVersionBlob = $"{Channel}/dnvm/latest.{osname}.{CurrentArchitecture.Current}.version";
            var latestCliVersionFile = Path.Combine(Dirs.Stage2, "sdk", version, ".version");

            AzurePublisherTool.PublishFile(latestCliVersionBlob, latestCliVersionFile);
            return(c.Success());
        }
Пример #7
0
        public static BuildTargetResult PublishLatestSharedFrameworkVersionTextFile(BuildTargetContext c)
        {
            var version = SharedFrameworkNugetVersion;

            var osname = Monikers.GetOSShortName();
            var latestSharedFXVersionBlob = $"{Channel}/dnvm/latest.sharedfx.{osname}.{CurrentArchitecture.Current}.version";
            var latestSharedFXVersionFile = Path.Combine(
                Dirs.Stage2,
                "shared",
                CompileTargets.SharedFrameworkName,
                version,
                ".version");

            AzurePublisherTool.PublishFile(latestSharedFXVersionBlob, latestSharedFXVersionFile);
            return(c.Success());
        }
Пример #8
0
        public static BuildTargetResult PublishManagedPackages(BuildTargetContext c)
        {
            // When building on non windows platforms, we don't compile the full set of
            // tfms a package targets (to prevent the need of having mono and the reference
            // assemblies installed. So we shouldn't publish these packages.
            if (EnvVars.Signed && CurrentPlatform.IsWindows)
            {
                foreach (var file in Directory.GetFiles(Dirs.Packages, "*.nupkg"))
                {
                    var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
                    AzurePublisherTool.PublishFile(hostBlob, file);
                    Console.WriteLine($"Publishing package {hostBlob} to Azure.");
                }
            }

            return(c.Success());
        }