Sha256: 68d12d77b646c6efa78ee1cf5d08e950962640a9d7fa3bc16c720b64aeeb7284
Contents?: true
Size: 1.82 KB
Versions: 13
Compression:
Stored size: 1.82 KB
Contents
# frozen_string_literal: true require 'eac_launcher/instances/runner_helper' module Avm module Tools class Runner class Launcher < ::EacRubyUtils::Console::DocoptRunner class Publish < ::EacLauncher::Instances::RunnerHelper DOC = <<~DOCOPT Publica projetos ou instâncias. Usage: __PROGRAM__ [options] [<instance_path>...] __PROGRAM__ -h | --help Options: -h --help Show this screen. --new Publish projects not published before. -s --stereotype=<st> Publish only for stereotype <stereotype>. --all Publish all instances. -d --dry-run "Dry run" publishing. --pending Publish only pending. --recache Rewrite instances cache. --run Confirm publishing. DOCOPT def run ::EacLauncher::Context.current.recache = options['--recache'] build_publish_options instances.each do |i| next unless i.options.publishable? i.send(instance_method) end end private def dry_run? options.fetch('--dry-run') end def instance_method run? || dry_run? ? 'publish_run' : 'publish_check' end def build_publish_options ::EacLauncher::Context.current.publish_options = publish_options end def publish_options { new: options.fetch('--new'), stereotype: options.fetch('--stereotype'), confirm: run? } end def run? options.fetch('--run') && !dry_run? end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems