예제 #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;
 }