/// <summary> /// Actions under the resolver. /// </summary> protected override void ExecuteTaskResolved() { // Get the stage var stage = (RegistrationStage)TypeDescriptor.GetConverter(typeof(RegistrationStage)).ConvertFromString(Bag.GetString(AttributeName.Stage)); // Collect the installation data and install it LocalInstaller.Install(CreateInstaller().HarvestInstallationData(), stage, GetMacros(), root => new DirectoryInfo(ResolveSourceDirRoot(root, Bag)), root => new DirectoryInfo(ResolveTargetDirRoot(root, Bag)), text => { Log.LogMessage(MessageImportance.Low, text); }); }
public void Test_Install() { var installer = new LocalInstaller( OriginalDirectory, WorkingDirectory, "csAnt", true ); installer.Install(); }
public void Test_Install_Import() { var installer = new LocalInstaller( OriginalDirectory, WorkingDirectory, "csAnt", true ); installer.ImportPath = OriginalDirectory; installer.Import = true; installer.Install(); }
public void Test_Install_Clone() { var installer = new LocalInstaller( OriginalDirectory, WorkingDirectory, "csAnt", true ); installer.CloneSource = OriginalDirectory; installer.Clone = true; installer.Install(); Assert.IsTrue( Directory.Exists(PathConverter.ToAbsolute(".git")), "The .git folder wasn't found." ); }
public override bool Run(string[] args) { var packageName = "csAnt"; var destination = ""; if (args.Length >= 2) { packageName = args[0]; destination = args[1]; } else if (args.Length >= 1) { destination = Path.GetFullPath(args[1]); } if (destination == "") { throw new Exception("A destination must be specified as an argument."); } var installer = new LocalInstaller( CurrentDirectory, destination, packageName, true ); installer.Install(); var arguments = new Arguments(args); if (arguments.Contains("r")) { Relocate(destination); } return(!IsError); }