Esempio n. 1
0
 public VersionBumper(VersionFileHelper fileHelper)
 {
     _fileHelper     = fileHelper;
     _metadataHelper = new VersionMetadataHelper(_fileHelper);
     _loggerFactory  = LoggerFactory.Create(builder => builder.AddConsole().AddDebug());
     _logger         = _loggerFactory.CreateLogger <VersionBumper>();
 }
 public VersionBumper(VersionFileHelper fileHelper, IList <string> changedModules)
 {
     _fileHelper     = fileHelper;
     _metadataHelper = new VersionMetadataHelper(_fileHelper);
     _loggerFactory  = LoggerFactory.Create(builder => builder.AddConsole().AddDebug());
     _logger         = _loggerFactory.CreateLogger <VersionBumper>();
     _changedModules = changedModules;
 }
Esempio n. 3
0
        private void UpdateSerializedCmdlet()
        {
            var moduleName        = _fileHelper.ModuleName;
            var version           = _newVersion;
            var newModuleMetadata = _metadataHelper.NewModuleMetadata;

            newModuleMetadata.ModuleName    = moduleName;
            newModuleMetadata.ModuleVersion = version;
            var serializedCmdletsDirectory = _fileHelper.SerializedCmdletsDirectory;
            var serializedCmdletName       = $"{moduleName}.json";
            var serializedCmdletFile       = Directory.GetFiles(serializedCmdletsDirectory, serializedCmdletName).FirstOrDefault();

            VersionMetadataHelper.SerializeCmdlets(serializedCmdletFile, newModuleMetadata);
        }
Esempio n. 4
0
 public VersionBumper(VersionFileHelper fileHelper)
 {
     _fileHelper     = fileHelper;
     _metadataHelper = new VersionMetadataHelper(_fileHelper);
 }