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)); }
public void Execute(IBuildContext buildContext) { buildContext.Logger.Info($"Write {_latestPublishXml.GetServerPath().AsString()}"); _latestPublishXml.SetBinaryContent(_fileContent); }