private static void UpdateSource(string parent, string source) { string url = PathConverter.ConvertPathToUrl(source, baseUrl, workspace); string nodeType = GetNodeType(url); if (nodeType == "file") { UpdateToReference(url); string r = PathConverter.ConvertUrlToPath(url, baseUrl, workspace); AddToGatheredRefsList(parent, r); FileInfo fi = new FileInfo(r); if (fi.Extension.EndsWith("proj")) { List <string> refList = ProjFileOps.GetReferences(fi, fi.DirectoryName); foreach (string f in refList) { UpdateSource(fi.FullName, f); } } } else { string r = PathConverter.ConvertUrlToPath(url, baseUrl, workspace); gatheredRefs.Add(r, parent); UpdateToReference(url); } }
private static void DoIt(string[] args) { InitializeBuild(args[2]); string rev = ""; switch (args[0].ToLower()) { case "-svn": InitializeWorkspace(args[1]); //GetBuildTools(); FileInfo fi = new FileInfo(PathConverter.ConvertUrlToPath(args[1], baseUrl, workspace)); Environment.CurrentDirectory = fi.DirectoryName; BuildWorkspace(); Compile(fi.Name); rev = Commit(args[2]); break; case "-b": break; default: break; } Success(rev); }
private static void UpdateToReference(string path, string rev = "") { Console.ForegroundColor = infoColor; Echo("Gathering source at " + path + "..."); string nodeType = GetNodeType(path); if (path.Contains("http://")) { path = PathConverter.ConvertUrlToPath(path, baseUrl, workspace); } string dir = ""; if (!File.Exists(path) && !Directory.Exists(path)) { if (!string.IsNullOrEmpty(nodeType)) { if (nodeType == "file") { FileInfo fi = new FileInfo(path); dir = fi.DirectoryName; } else { DirectoryInfo di = new DirectoryInfo(path); dir = di.FullName; } while (!Directory.Exists(dir)) { RecursiveUpdate(dir); } if (Directory.Exists(dir)) { FullUpdate(dir); } } } }