Class: Metanorma::Release::ReleaseCommand
- Inherits:
-
Object
- Object
- Metanorma::Release::ReleaseCommand
- 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.
Constructor Details
#initialize(config) ⇒ ReleaseCommand
Returns a new instance of ReleaseCommand.
15 16 17 |
# File 'lib/metanorma/release/commands/release_command.rb', line 15 def initialize(config) @config = config end |
Instance Method Details
#call ⇒ Object
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 |
# File 'lib/metanorma/release/commands/release_command.rb', line 19 def call org_config = load_org_config config = load_config(org_config: org_config) = { token: @config.token } publisher = PlatformFactory.build_publisher(@config.platform, ) channel_override = Channel.parse_list(@config.channels) if @config.channels deps = ReleasePipeline::Dependencies.new( extractor: Publication, filters: [], change_detector: ContentHashChangeDetector.new(previous_releases: {}), 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, manifest_path: @config.manifest, force: @config.force, force_replace_patterns: @config.force_replace && !@config.force_replace.empty? ? @config.force_replace : nil, concurrency: @config.concurrency, default_visibility: "public", ) ReleasePipeline.new(deps).run(pipeline_config) end |