Ejemplo n.º 1
0
        private PublishPayloadHolder ReadPublishPayload(IFileHolder publishXml)
        {
            _logger.Info($"Reading {publishXml.GetServerPath().AsString()}");
            if (!publishXml.Exists())
            {
                throw new ApplicationException($"File {publishXml.GetServerPath().AsString()} doesn't exists!");
            }

            var sourceControlFile  = publishXml.ToSourceControlFile();
            var publishFileContent = sourceControlFile.GetContent();
            var publishPayload     = _services.CreatePublishPayloadSerializer().Deserialize(sourceControlFile.GetContent());

            var latestChangeSet = sourceControlFile.GetLatestChangeSet();

            return(new PublishPayloadHolder(publishPayload,
                                            publishFileContent,
                                            _services.OperatingSystemServices.AccountManagement.GetAccountInfo(latestChangeSet.CommiterUserName).EmailAddress));
        }
Ejemplo n.º 2
0
 public void Execute(IBuildContext buildContext)
 {
     buildContext.Logger.Info($"Write {_latestPublishXml.GetServerPath().AsString()}");
     _latestPublishXml.SetBinaryContent(_fileContent);
 }