private void Initialize() { Configuration = new Configuration(); Logger = new BumperLogger.Logger(Configuration); BumperProvider = new BumperProvider(Configuration, Logger); FileUpdater = new FileUpdater(BumperProvider, Configuration, Logger); }
private void UpdateVersion(XmlDocument xmlDocument) { var node = xmlDocument.SelectSingleNode(Configuration.VersionPath); node.InnerText = BumperProvider.Bump(node.InnerText, Configuration.BumperType); Logger.Log($"Updated to {node.InnerText}"); }
private void UpdateDependencyVersions(XmlDocument xmlDocument) { var nodes = xmlDocument.SelectNodes(Configuration.DependencyVersionPath); foreach (XmlNode node in nodes) { var includeAttribute = node.Attributes[Configuration.DependencyIncludeAttribute]; var versionAttribute = node.Attributes[Configuration.DependencyVersionAttribute]; versionAttribute.Value = BumperProvider.Bump(versionAttribute.Value, Configuration.BumperType); Logger.Log($"Dependency {includeAttribute.InnerText} updated to {versionAttribute.Value}"); } }
public FileUpdater(BumperProvider bumperProvider, Configuration configuration, ILogger logger) { BumperProvider = bumperProvider; Configuration = configuration; Logger = logger; }