Esempio n. 1
0
        public static bool Execute(string rootDir)
        {
            DeleteBackupFolders(rootDir);
            var version = GetVersion(rootDir);
            var documentHelper = new DocumentHelper();
            var projectFiles = GetProjects(rootDir).ToArray();
            foreach (var file in projectFiles) {
                var projectReferencesUpdater = new ProjectUpdater(documentHelper,rootDir,version);
                projectReferencesUpdater.Update(file);
            }

            var nuspecs = Directory.GetFiles(Path.Combine(rootDir, @"Support\Nuspec"), "*.nuspec");
            foreach (var file in nuspecs) {
                var projectReferencesUpdater = new NugetUpdater(documentHelper, rootDir, version, projectFiles,nuspecs);
                projectReferencesUpdater.Update(file);
            }
            return true;
        }
Esempio n. 2
0
        public static bool Execute(string rootDir){
            DeleteBackupFolders(rootDir);
            var documentHelper = new DocumentHelper();
            var files = Directory.GetFiles(rootDir, "*.csproj", SearchOption.AllDirectories);
            foreach (var file in files) {
                if (!_excludedDirs.Any(s => file.IndexOf(s, StringComparison.Ordinal)>-1)) {
                    var projectReferencesUpdater = new ProjectUpdater(documentHelper,rootDir);
                    projectReferencesUpdater.Update(file);
                }
            }

            var version = GetVersion(rootDir);
            files = Directory.GetFiles(Path.Combine(rootDir, @"Resource\Nuget"), "*.nuspec");
            foreach (var file in files) {
                var projectReferencesUpdater = new NugetUpdater(documentHelper, rootDir, version);
                projectReferencesUpdater.Update(file);
            }

            return true;
        }