示例#1
0
        private void Initialize()
        {
            Configuration = new Configuration();
            Logger        = new BumperLogger.Logger(Configuration);

            BumperProvider = new BumperProvider(Configuration, Logger);
            FileUpdater    = new FileUpdater(BumperProvider, Configuration, Logger);
        }
示例#2
0
        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}");
        }
示例#3
0
        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}");
            }
        }
示例#4
0
 public FileUpdater(BumperProvider bumperProvider, Configuration configuration, ILogger logger)
 {
     BumperProvider = bumperProvider;
     Configuration  = configuration;
     Logger         = logger;
 }