Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAssemblyManager" /> class.
 /// </summary>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="modulesRegistration">The module loader.</param>
 /// <param name="assemblyLoader">The assembly loader.</param>
 public DefaultAssemblyManager(
     IWorkingDirectory workingDirectory,
     IModulesRegistration modulesRegistration,
     IAssemblyLoader assemblyLoader)
 {
     this.workingDirectory    = workingDirectory;
     this.modulesRegistration = modulesRegistration;
     this.assemblyLoader      = assemblyLoader;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAssemblyManager" /> class.
 /// </summary>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="modulesRegistration">The module loader.</param>
 /// <param name="assemblyLoader">The assembly loader.</param>
 public DefaultAssemblyManager(
     IWorkingDirectory workingDirectory,
     IModulesRegistration modulesRegistration,
     IAssemblyLoader assemblyLoader)
 {
     this.workingDirectory = workingDirectory;
     this.modulesRegistration = modulesRegistration;
     this.assemblyLoader = assemblyLoader;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAssemblyManager" /> class.
 /// </summary>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="modulesRegistration">The module loader.</param>
 /// <param name="embeddedResourcesProvider">The embedded resources provider.</param>
 /// <param name="assemblyLoader">The assembly loader.</param>
 public DefaultAssemblyManager(
     IWorkingDirectory workingDirectory,
     IModulesRegistration modulesRegistration,
     IEmbeddedResourcesProvider embeddedResourcesProvider,
     IAssemblyLoader assemblyLoader)
 {
     this.workingDirectory = workingDirectory;
     this.modulesRegistration = modulesRegistration;
     this.assemblyLoader = assemblyLoader;
     this.embeddedResourcesProvider = embeddedResourcesProvider;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAssemblyManager" /> class.
 /// </summary>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="modulesRegistration">The module loader.</param>
 /// <param name="embeddedResourcesProvider">The embedded resources provider.</param>
 /// <param name="assemblyLoader">The assembly loader.</param>
 public DefaultAssemblyManager(
     IWorkingDirectory workingDirectory,
     IModulesRegistration modulesRegistration,
     IEmbeddedResourcesProvider embeddedResourcesProvider,
     IAssemblyLoader assemblyLoader)
 {
     this.workingDirectory          = workingDirectory;
     this.modulesRegistration       = modulesRegistration;
     this.assemblyLoader            = assemblyLoader;
     this.embeddedResourcesProvider = embeddedResourcesProvider;
 }
Ejemplo n.º 5
0
        public static void GetSharedResources(IWorkingDirectory workingDirectory)
        {
            var localPath  = workingDirectory.DirectoryInfo.FullName;
            var serverPath = Properties.Settings.Default.SharedResourceServerPath;

            if (string.IsNullOrEmpty(serverPath))
            {
                return;
            }

            var serverItemSpec = new ItemSpec(serverPath, RecursionType.Full);
            var request        = new[] { new GetRequest(serverItemSpec, VersionSpec.Latest) };

            SourceCodeControlHelper.GetLatestFromSourceCodeControl(serverPath, localPath, request);
        }
Ejemplo n.º 6
0
        public DefaultVersionChecker(IUnitOfWork unitOfWork, IModulesRegistration modulesRegistration, IWorkingDirectory workingDirectory)
        {
            this.unitOfWork          = unitOfWork;
            this.modulesRegistration = modulesRegistration;
            this.workingDirectory    = workingDirectory;

            try
            {
                var isLoaded = LoadFromFile();

                if (!isLoaded)
                {
                    LoadFromDatabase();
                }
            }
            catch (Exception ex)
            {
                Log.Error("DefaultVersionChecker loading from file / database failed.", ex);
            }
        }
        public DefaultVersionChecker(IUnitOfWork unitOfWork, IModulesRegistration modulesRegistration, IWorkingDirectory workingDirectory)
        {
            this.unitOfWork = unitOfWork;
            this.modulesRegistration = modulesRegistration;
            this.workingDirectory = workingDirectory;

            try
            {
                var isLoaded = LoadFromFile();
                
                if (!isLoaded)
                {
                    LoadFromDatabase();
                }
            }
            catch (Exception ex)
            {
                Log.Error("DefaultVersionChecker loading from file / database failed.", ex);
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultWebAssemblyManager"/> class.
 /// </summary>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="modulesRegistration">The modules registration.</param>
 /// <param name="embeddedResourcesProvider">The embedded resources provider.</param>
 /// <param name="assemblyLoader">The assembly loader.</param>
 public DefaultWebAssemblyManager(IWorkingDirectory workingDirectory, IModulesRegistration modulesRegistration,
                                  IEmbeddedResourcesProvider embeddedResourcesProvider, IAssemblyLoader assemblyLoader)
     : base(workingDirectory, modulesRegistration, assemblyLoader)
 {
     this.embeddedResourcesProvider = embeddedResourcesProvider;
 }
Ejemplo n.º 9
0
        public static string GetDeploymentItems(string teamProjectName, string buildType, IWorkingDirectory workingDirectory)
        {
            var localPath  = workingDirectory.DirectoryInfo.FullName;
            var serverPath = GetConfigurationFileLocation(teamProjectName, buildType);

            TraceHelper.TraceInformation(TraceSwitches.TfsDeployer, "Getting files from {0} to {1}", serverPath, localPath);

            var serverItemSpec = new ItemSpec(serverPath, RecursionType.Full);
            var request        = new[] { new GetRequest(serverItemSpec, VersionSpec.Latest) };

            SourceCodeControlHelper.GetLatestFromSourceCodeControl(serverPath, localPath, request);

            return(localPath);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultWebAssemblyManager"/> class.
 /// </summary>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="modulesRegistration">The modules registration.</param>
 /// <param name="embeddedResourcesProvider">The embedded resources provider.</param>
 /// <param name="assemblyLoader">The assembly loader.</param>
 public DefaultWebAssemblyManager(IWorkingDirectory workingDirectory, IModulesRegistration modulesRegistration, 
     IEmbeddedResourcesProvider embeddedResourcesProvider, IAssemblyLoader assemblyLoader)
     : base(workingDirectory, modulesRegistration, assemblyLoader)
 {
     this.embeddedResourcesProvider = embeddedResourcesProvider;
 }
Ejemplo n.º 11
0
 public RemoveWorkingDirectory(IWorkingDirectory directory)
 {
     Directory = directory;
 }
Ejemplo n.º 12
0
        public IEnumerable <Mapping> ReadMappings(string teamProjectName, IBuildData teamBuild, IWorkingDirectory workingDirectory)
        {
            TraceHelper.TraceInformation(TraceSwitches.TfsDeployer, "Reading Configuration for Team Project: {0} Team Build: {1}", teamProjectName, teamBuild.BuildType);
            TfsHelper.GetSharedResources(workingDirectory);
            _workingDirectory = TfsHelper.GetDeploymentItems(teamProjectName, teamBuild.BuildType, workingDirectory);
            var configuration = ConfigurationReaderHelper.Read(Path.Combine(_workingDirectory, ConfigurationFileName));

            if (configuration == null)
            {
                return(new Mapping[0]);
            }
            return(configuration.Mappings);
        }
Ejemplo n.º 13
0
 public AddWorkindDirectory(IWorkingDirectory directory)
 {
     Directory = directory;
 }
Ejemplo n.º 14
0
 public Repository(IWorkingDirectory directory)
     : this(Path.Combine(directory.ToString(), ".git"))
 {
 }
Ejemplo n.º 15
0
 public IGit Clone(string repospec, string name, params string[] options)
 {
     var newOptions = MergeOptions(new[] {repospec, name}, options);
     Command("clone", newOptions);
     WorkingDirectory = new WorkingDirectory(WorkingDirectory.ToString(), name);
     return this;
 }