Class: Metanorma::Release::ReleaseCommand
- Inherits:
-
Object
- Object
- Metanorma::Release::ReleaseCommand
- Extended by:
- ConfigLoader
- Defined in:
- lib/metanorma/release/commands/release_command.rb
Defined Under Namespace
Classes: Config
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config) ⇒ ReleaseCommand
constructor
A new instance of ReleaseCommand.
Methods included from ConfigLoader
Constructor Details
#initialize(config) ⇒ ReleaseCommand
Returns a new instance of ReleaseCommand.
14 15 16 |
# File 'lib/metanorma/release/commands/release_command.rb', line 14 def initialize(config) @config = config end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/metanorma/release/commands/release_command.rb', line 18 def call config = self.class.load_config( config_source: @config.config_source, manifest: @config.manifest, ) = { token: @config.token } publisher = PlatformFactory.build_publisher(@config.platform, ) channel_override = Channel.parse_list(@config.channels) if @config.channels previous_releases = build_previous_releases deps = ReleasePipeline::Dependencies.new( extractor: RxlExtractor, filters: [], change_detector: ContentHashChangeDetector.new(previous_releases: previous_releases, output_dir: @config.output_dir), packager: ZipPackager.new(output_dir: @config.output_dir), publisher: publisher, slug_registry: SlugRegistry.from_config(config), manifest: nil, channel_override: channel_override, config: config, ) pipeline_config = ReleasePipeline::Config.new( output_dir: @config.output_dir, force: @config.force, force_replace_patterns: @config.force_replace && !@config.force_replace.empty? ? @config.force_replace : nil, concurrency: @config.concurrency, ) ReleasePipeline.new(deps).run(pipeline_config) end |