Пример #1
0
        private void Deploy(FileLink zipLocation)
        {
            var zipFolder = new LocalFolder(zipLocation.Folder);

            var outputResource = FolderResource.From("_deploy_");
            var outputFolder   = zipFolder.Then(outputResource);

            try
            {
                Deploy(outputFolder);

                zipFolder.Delete(zipLocation.Name, strict: false);

                Log.Info("[deploy] Zipping to {Location:l}", zipLocation);

                ZipFile.CreateFromDirectory(
                    outputFolder.Link.ToString(),
                    zipLocation.ToString(),
                    default(CompressionLevel),
                    includeBaseDirectory: false);
            }
            finally
            {
                outputFolder.Delete(strict: false);

                Log.Info("[deploy] Deleted temporary folder {Output:l}", outputResource);
            }
        }
Пример #2
0
        private IEnumerable <RuntimePackage> ReadTotemSubmodulePackages()
        {
            var submoduleFolder = _deployment.InTotemSubmodule
                                ? _deployment.Folder
                                : _deployment.Folder.Up(1).Then(FolderResource.From("Submodules/Totem/Source"));

            var subfolders =
                from subfolder in submoduleFolder.ReadFolders()
                let path = subfolder.Path.ToString()
                           where path != "Totem" && path != "Totem.Runtime"
                           select subfolder;

            return(ReadPackages(submoduleFolder, subfolders.ToMany()));
        }
Пример #3
0
 public FolderResource ExpandBuild(FolderResource packageFolder)
 {
     return(!InSolution
                         ? packageFolder
                         : packageFolder.Then(FolderResource.From("bin/" + SolutionConfiguration)));
 }
Пример #4
0
 internal PackageBuild(RuntimePackage package, IFolder deploymentOutput)
 {
     _package = package;
     _output  = deploymentOutput.Then(FolderResource.From(package.Name));
 }
Пример #5
0
 private IFolder GetLogFolder(IFolder dataFolder)
 {
     return(dataFolder.Then(FolderResource.From(Log.DataFolder)));
 }