public override bool Execute()
        {
            Trace.Listeners.MsBuildListenedInvoke(Log, () =>
            {
                var updater = new LocalVersionsRepoUpdater();

                if (!string.IsNullOrEmpty(GitHubAuthToken))
                {
                    updater.GitHubAuth = new GitHubAuth(GitHubAuthToken, GitHubUser);
                }

                GitHubBranch branch = null;
                if (!string.IsNullOrEmpty(VersionsRepo))
                {
                    branch = new GitHubBranch(
                        VersionsRepoBranch,
                        new GitHubProject(
                            VersionsRepo,
                            VersionsRepoOwner));
                }

                updater
                .UpdateBuildInfoFilesAsync(
                    ShippedNuGetPackage.Select(i => i.ItemSpec),
                    VersionsRepoLocalBaseDir,
                    VersionsRepoPath,
                    branch)
                .Wait();
            });
            return(true);
        }
        public override bool Execute()
        {
            Trace.Listeners.MsBuildListenedInvoke(Log, () =>
            {
                var updater = new LocalVersionsRepoUpdater();

                updater.UpdateBuildInfoLatestPackages(
                    ShippedNuGetPackage.Select(item => item.ItemSpec),
                    VersionsRepoLocalBaseDir,
                    VersionsRepoPath);
            });
            return(true);
        }
Example #3
0
        public override bool Execute()
        {
            MsBuildTraceListener[] listeners = Trace.Listeners.AddMsBuildTraceListeners(Log);

            var updater = new LocalVersionsRepoUpdater();

            updater.UpdateBuildInfoLatestPackages(
                ShippedNuGetPackage.Select(item => item.ItemSpec),
                VersionsRepoLocalBaseDir,
                VersionsRepoPath);

            Trace.Listeners.RemoveMsBuildTraceListeners(listeners);

            return(true);
        }
        public bool ExecuteTask(IVersionsRepoUpdaterFactory versionsRepoUpdaterFactory)
        {
            Trace.Listeners.MsBuildListenedInvoke(Log, () =>
            {
                var gitHubAuth = new GitHubAuth(GitHubAuthToken, GitHubUser, GitHubEmail);

                var updater = versionsRepoUpdaterFactory.CreateGitHubVersionsRepoUpdater(gitHubAuth, VersionsRepoOwner, VersionsRepo);

                updater.UpdateBuildInfoAsync(
                    ShippedNuGetPackage.Select(item => item.ItemSpec),
                    VersionsRepoPath)
                .Wait();
            });
            return(true);
        }
Example #5
0
        public override bool Execute()
        {
            MsBuildTraceListener[] listeners = Trace.Listeners.AddMsBuildTraceListeners(Log);

            var gitHubAuth = new GitHubAuth(GitHubAuthToken, GitHubUser, GitHubEmail);

            var updater = new VersionsRepoUpdater(gitHubAuth, VersionsRepoOwner, VersionsRepo);

            updater.UpdateBuildInfoAsync(
                ShippedNuGetPackage.Select(item => item.ItemSpec),
                VersionsRepoPath)
            .Wait();

            Trace.Listeners.RemoveMsBuildTraceListeners(listeners);

            return(true);
        }