avm-tools 0.58.1 → 0.62.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/cached_download.rb +39 -0
- data/lib/avm/eac_redmine_base0/core_update.rb +110 -0
- data/lib/avm/eac_redmine_base0/data_unit.rb +27 -0
- data/lib/avm/eac_redmine_base0/deploy.rb +36 -0
- data/lib/avm/eac_redmine_base0/instance.rb +38 -0
- data/lib/avm/local_projects.rb +9 -0
- data/lib/avm/local_projects/instance.rb +35 -0
- data/lib/avm/local_projects/jobs/update.rb +29 -0
- data/lib/avm/projects.rb +9 -0
- data/lib/avm/projects/stereotype.rb +62 -0
- data/lib/avm/projects/stereotypes.rb +20 -0
- data/lib/avm/projects/stereotypes/git.rb +25 -0
- data/lib/avm/projects/stereotypes/git/local_project_mixin.rb +19 -0
- data/lib/avm/projects/stereotypes/git/publish.rb +15 -0
- data/lib/avm/projects/stereotypes/git/warp.rb +27 -0
- data/lib/avm/projects/stereotypes/git_subrepo.rb +34 -0
- data/lib/avm/projects/stereotypes/git_subrepo/publish.rb +14 -0
- data/lib/avm/projects/stereotypes/git_subrepo/warp.rb +87 -0
- data/lib/avm/projects/stereotypes/git_subtree.rb +51 -0
- data/lib/avm/projects/stereotypes/git_subtree/publish.rb +12 -0
- data/lib/avm/projects/stereotypes/git_subtree/warp.rb +29 -0
- data/lib/avm/projects/stereotypes/rails_application.rb +23 -0
- data/lib/avm/projects/stereotypes/redmine_plugin.rb +23 -0
- data/lib/avm/projects/stereotypes/ruby_gem.rb +30 -0
- data/lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb +19 -0
- data/lib/avm/projects/stereotypes/ruby_gem/publish.rb +129 -0
- data/lib/avm/projects/stereotypes/ruby_gem/update.rb +59 -0
- data/lib/avm/stereotypes/eac_webapp_base0/runner/deploy.rb +3 -1
- data/lib/avm/sync.rb +94 -0
- data/lib/avm/tools/runner/eac_redmine_base0.rb +2 -2
- data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +67 -0
- data/lib/avm/tools/runner/eac_redmine_base0/deploy.rb +1 -1
- data/lib/avm/tools/runner/git/issue.rb +43 -4
- data/lib/avm/tools/runner/launcher.rb +10 -2
- data/lib/avm/tools/runner/launcher/instances.rb +45 -0
- data/lib/avm/tools/runner/launcher/projects.rb +50 -0
- data/lib/avm/tools/runner/launcher/publish.rb +65 -0
- data/lib/avm/tools/runner/local_project.rb +32 -0
- data/lib/avm/tools/runner/local_project/info.rb +25 -0
- data/lib/avm/tools/runner/local_project/update.rb +26 -0
- data/lib/avm/tools/version.rb +1 -1
- data/lib/eac_launcher.rb +1 -2
- data/lib/eac_launcher/context/instance_manager.rb +1 -0
- data/lib/eac_launcher/git/base/dirty_files.rb +5 -14
- data/lib/eac_launcher/git/publish_base.rb +1 -0
- data/lib/eac_launcher/git/sub_warp_base.rb +1 -1
- data/lib/eac_launcher/git/warp_base.rb +2 -2
- data/lib/eac_launcher/instances/base.rb +2 -2
- data/lib/eac_launcher/instances/runner_helper.rb +1 -1
- data/lib/eac_launcher/paths/logical.rb +2 -2
- data/template/avm/{stereotypes/eac_redmine_base0 → eac_redmine_base0}/deploy/config/install.sh.template +0 -0
- data/template/avm/{stereotypes/eac_redmine_base0 → eac_redmine_base0}/deploy/config/secrets.yml +0 -0
- data/vendor/eac_git/lib/eac_git/local.rb +1 -1
- data/vendor/eac_git/lib/eac_git/local/dirty_files.rb +38 -0
- data/vendor/eac_git/lib/eac_git/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +2 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +2 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +2 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +5 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +8 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- metadata +41 -27
- data/lib/avm/stereotypes/eac_redmine_base0/data_unit.rb +0 -29
- data/lib/avm/stereotypes/eac_redmine_base0/deploy.rb +0 -38
- data/lib/avm/stereotypes/eac_redmine_base0/instance.rb +0 -40
- data/lib/eac_launcher/runner.rb +0 -21
- data/lib/eac_launcher/runner/instances.rb +0 -41
- data/lib/eac_launcher/runner/projects.rb +0 -46
- data/lib/eac_launcher/runner/publish.rb +0 -59
- data/lib/eac_launcher/stereotype.rb +0 -52
- data/lib/eac_launcher/stereotypes.rb +0 -14
- data/lib/eac_launcher/stereotypes/git.rb +0 -21
- data/lib/eac_launcher/stereotypes/git/publish.rb +0 -13
- data/lib/eac_launcher/stereotypes/git/warp.rb +0 -25
- data/lib/eac_launcher/stereotypes/git_subrepo.rb +0 -30
- data/lib/eac_launcher/stereotypes/git_subrepo/publish.rb +0 -12
- data/lib/eac_launcher/stereotypes/git_subrepo/warp.rb +0 -85
- data/lib/eac_launcher/stereotypes/git_subtree.rb +0 -47
- data/lib/eac_launcher/stereotypes/git_subtree/publish.rb +0 -10
- data/lib/eac_launcher/stereotypes/git_subtree/warp.rb +0 -27
- data/lib/eac_launcher/stereotypes/rails.rb +0 -21
- data/lib/eac_launcher/stereotypes/redmine_plugin.rb +0 -21
- data/lib/eac_launcher/stereotypes/ruby_gem.rb +0 -27
- data/lib/eac_launcher/stereotypes/ruby_gem/publish.rb +0 -127
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.62.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -274,6 +274,7 @@ files:
|
|
274
274
|
- Gemfile
|
275
275
|
- exe/avm
|
276
276
|
- lib/avm.rb
|
277
|
+
- lib/avm/cached_download.rb
|
277
278
|
- lib/avm/configs.rb
|
278
279
|
- lib/avm/data.rb
|
279
280
|
- lib/avm/data/instance.rb
|
@@ -289,6 +290,10 @@ files:
|
|
289
290
|
- lib/avm/docker/image.rb
|
290
291
|
- lib/avm/docker/registry.rb
|
291
292
|
- lib/avm/docker/runner.rb
|
293
|
+
- lib/avm/eac_redmine_base0/core_update.rb
|
294
|
+
- lib/avm/eac_redmine_base0/data_unit.rb
|
295
|
+
- lib/avm/eac_redmine_base0/deploy.rb
|
296
|
+
- lib/avm/eac_redmine_base0/instance.rb
|
292
297
|
- lib/avm/executables.rb
|
293
298
|
- lib/avm/files.rb
|
294
299
|
- lib/avm/files/formatter.rb
|
@@ -358,9 +363,31 @@ files:
|
|
358
363
|
- lib/avm/instances/entries.rb
|
359
364
|
- lib/avm/instances/entries/entry_reader.rb
|
360
365
|
- lib/avm/instances/entry_keys.rb
|
366
|
+
- lib/avm/local_projects.rb
|
367
|
+
- lib/avm/local_projects/instance.rb
|
368
|
+
- lib/avm/local_projects/jobs/update.rb
|
361
369
|
- lib/avm/patches.rb
|
362
370
|
- lib/avm/patches/object/template.rb
|
363
371
|
- lib/avm/path_string.rb
|
372
|
+
- lib/avm/projects.rb
|
373
|
+
- lib/avm/projects/stereotype.rb
|
374
|
+
- lib/avm/projects/stereotypes.rb
|
375
|
+
- lib/avm/projects/stereotypes/git.rb
|
376
|
+
- lib/avm/projects/stereotypes/git/local_project_mixin.rb
|
377
|
+
- lib/avm/projects/stereotypes/git/publish.rb
|
378
|
+
- lib/avm/projects/stereotypes/git/warp.rb
|
379
|
+
- lib/avm/projects/stereotypes/git_subrepo.rb
|
380
|
+
- lib/avm/projects/stereotypes/git_subrepo/publish.rb
|
381
|
+
- lib/avm/projects/stereotypes/git_subrepo/warp.rb
|
382
|
+
- lib/avm/projects/stereotypes/git_subtree.rb
|
383
|
+
- lib/avm/projects/stereotypes/git_subtree/publish.rb
|
384
|
+
- lib/avm/projects/stereotypes/git_subtree/warp.rb
|
385
|
+
- lib/avm/projects/stereotypes/rails_application.rb
|
386
|
+
- lib/avm/projects/stereotypes/redmine_plugin.rb
|
387
|
+
- lib/avm/projects/stereotypes/ruby_gem.rb
|
388
|
+
- lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb
|
389
|
+
- lib/avm/projects/stereotypes/ruby_gem/publish.rb
|
390
|
+
- lib/avm/projects/stereotypes/ruby_gem/update.rb
|
364
391
|
- lib/avm/rails.rb
|
365
392
|
- lib/avm/rails/runners.rb
|
366
393
|
- lib/avm/rails/runners/bundle.rb
|
@@ -383,9 +410,6 @@ files:
|
|
383
410
|
- lib/avm/stereotypes/eac_rails_base0/deploy.rb
|
384
411
|
- lib/avm/stereotypes/eac_rails_base0/instance.rb
|
385
412
|
- lib/avm/stereotypes/eac_redmine_base0.rb
|
386
|
-
- lib/avm/stereotypes/eac_redmine_base0/data_unit.rb
|
387
|
-
- lib/avm/stereotypes/eac_redmine_base0/deploy.rb
|
388
|
-
- lib/avm/stereotypes/eac_redmine_base0/instance.rb
|
389
413
|
- lib/avm/stereotypes/eac_ubuntu_base0.rb
|
390
414
|
- lib/avm/stereotypes/eac_ubuntu_base0/apache.rb
|
391
415
|
- lib/avm/stereotypes/eac_ubuntu_base0/apache/site.rb
|
@@ -411,6 +435,7 @@ files:
|
|
411
435
|
- lib/avm/stereotypes/postgresql/instance_with.rb
|
412
436
|
- lib/avm/stereotypes/rails.rb
|
413
437
|
- lib/avm/stereotypes/rails/instance.rb
|
438
|
+
- lib/avm/sync.rb
|
414
439
|
- lib/avm/tools.rb
|
415
440
|
- lib/avm/tools/runner.rb
|
416
441
|
- lib/avm/tools/runner/eac_rails_base0.rb
|
@@ -421,6 +446,7 @@ files:
|
|
421
446
|
- lib/avm/tools/runner/eac_rails_base0/runner.rb
|
422
447
|
- lib/avm/tools/runner/eac_redmine_base0.rb
|
423
448
|
- lib/avm/tools/runner/eac_redmine_base0/bundle.rb
|
449
|
+
- lib/avm/tools/runner/eac_redmine_base0/core_update.rb
|
424
450
|
- lib/avm/tools/runner/eac_redmine_base0/data.rb
|
425
451
|
- lib/avm/tools/runner/eac_redmine_base0/data/dump.rb
|
426
452
|
- lib/avm/tools/runner/eac_redmine_base0/deploy.rb
|
@@ -445,6 +471,12 @@ files:
|
|
445
471
|
- lib/avm/tools/runner/git/subrepo.rb
|
446
472
|
- lib/avm/tools/runner/git/subrepo/check.rb
|
447
473
|
- lib/avm/tools/runner/launcher.rb
|
474
|
+
- lib/avm/tools/runner/launcher/instances.rb
|
475
|
+
- lib/avm/tools/runner/launcher/projects.rb
|
476
|
+
- lib/avm/tools/runner/launcher/publish.rb
|
477
|
+
- lib/avm/tools/runner/local_project.rb
|
478
|
+
- lib/avm/tools/runner/local_project/info.rb
|
479
|
+
- lib/avm/tools/runner/local_project/update.rb
|
448
480
|
- lib/avm/tools/runner/ruby.rb
|
449
481
|
- lib/avm/tools/runner/ruby/gems.rb
|
450
482
|
- lib/avm/tools/runner/ruby/gems/generate.rb
|
@@ -487,28 +519,11 @@ files:
|
|
487
519
|
- lib/eac_launcher/ruby/gem.rb
|
488
520
|
- lib/eac_launcher/ruby/gem/build.rb
|
489
521
|
- lib/eac_launcher/ruby/gem/specification.rb
|
490
|
-
- lib/eac_launcher/runner.rb
|
491
|
-
- lib/eac_launcher/runner/instances.rb
|
492
|
-
- lib/eac_launcher/runner/projects.rb
|
493
|
-
- lib/eac_launcher/runner/publish.rb
|
494
|
-
- lib/eac_launcher/stereotype.rb
|
495
|
-
- lib/eac_launcher/stereotypes.rb
|
496
|
-
- lib/eac_launcher/stereotypes/git.rb
|
497
|
-
- lib/eac_launcher/stereotypes/git/publish.rb
|
498
|
-
- lib/eac_launcher/stereotypes/git/warp.rb
|
499
|
-
- lib/eac_launcher/stereotypes/git_subrepo.rb
|
500
|
-
- lib/eac_launcher/stereotypes/git_subrepo/publish.rb
|
501
|
-
- lib/eac_launcher/stereotypes/git_subrepo/warp.rb
|
502
|
-
- lib/eac_launcher/stereotypes/git_subtree.rb
|
503
|
-
- lib/eac_launcher/stereotypes/git_subtree/publish.rb
|
504
|
-
- lib/eac_launcher/stereotypes/git_subtree/warp.rb
|
505
|
-
- lib/eac_launcher/stereotypes/rails.rb
|
506
|
-
- lib/eac_launcher/stereotypes/redmine_plugin.rb
|
507
|
-
- lib/eac_launcher/stereotypes/ruby_gem.rb
|
508
|
-
- lib/eac_launcher/stereotypes/ruby_gem/publish.rb
|
509
522
|
- lib/eac_launcher/vendor.rb
|
510
523
|
- lib/eac_launcher/vendor/github.rb
|
511
524
|
- lib/eac_launcher/version.rb
|
525
|
+
- template/avm/eac_redmine_base0/deploy/config/install.sh.template
|
526
|
+
- template/avm/eac_redmine_base0/deploy/config/secrets.yml
|
512
527
|
- template/avm/ruby/gems/generator/gemspec.template
|
513
528
|
- template/avm/ruby/gems/generator/root_lib.template
|
514
529
|
- template/avm/ruby/gems/generator/static/Gemfile
|
@@ -518,8 +533,6 @@ files:
|
|
518
533
|
- template/avm/self/docker_image/Dockerfile
|
519
534
|
- template/avm/self/docker_image/entrypoint.sh
|
520
535
|
- template/avm/stereotypes/eac_rails_base0/deploy/config/database.yml.template
|
521
|
-
- template/avm/stereotypes/eac_redmine_base0/deploy/config/install.sh.template
|
522
|
-
- template/avm/stereotypes/eac_redmine_base0/deploy/config/secrets.yml
|
523
536
|
- template/avm/stereotypes/eac_ubuntu_base0/docker_image/Dockerfile
|
524
537
|
- template/avm/stereotypes/eac_webapp_base0/apache_host/no_ssl.conf
|
525
538
|
- template/avm/stereotypes/eac_wordpress_base0/deploy/wp-config.php.template
|
@@ -548,6 +561,7 @@ files:
|
|
548
561
|
- vendor/eac_git/lib/eac_git.rb
|
549
562
|
- vendor/eac_git/lib/eac_git/executables.rb
|
550
563
|
- vendor/eac_git/lib/eac_git/local.rb
|
564
|
+
- vendor/eac_git/lib/eac_git/local/dirty_files.rb
|
551
565
|
- vendor/eac_git/lib/eac_git/local/subrepo.rb
|
552
566
|
- vendor/eac_git/lib/eac_git/local/subrepo/config.rb
|
553
567
|
- vendor/eac_git/lib/eac_git/remote.rb
|
@@ -956,7 +970,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
956
970
|
- !ruby/object:Gem::Version
|
957
971
|
version: '0'
|
958
972
|
requirements: []
|
959
|
-
rubygems_version: 3.0.
|
973
|
+
rubygems_version: 3.0.8
|
960
974
|
signing_key:
|
961
975
|
specification_version: 4
|
962
976
|
summary: Tools for AVM.
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/data/instance/unit'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'open-uri'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module Stereotypes
|
9
|
-
module EacRedmineBase0
|
10
|
-
class DataUnit < ::Avm::Data::Instance::Unit
|
11
|
-
common_constructor :instance
|
12
|
-
|
13
|
-
EXTENSION = '.tar'
|
14
|
-
|
15
|
-
def do_dump(data_path)
|
16
|
-
::File.open(data_path, 'wb') do |file|
|
17
|
-
file << URI.parse(export_url).read
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def export_url
|
22
|
-
uri = ::Addressable::URI.parse(instance.read_entry('web.url')) + '/backup/export'
|
23
|
-
uri.query_values = { key: instance.read_entry('admin.api_key') }
|
24
|
-
uri.to_s
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/stereotypes/eac_webapp_base0/deploy'
|
4
|
-
require 'eac_ruby_utils/ruby'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Stereotypes
|
8
|
-
module EacRedmineBase0
|
9
|
-
class Deploy < ::Avm::Stereotypes::EacWebappBase0::Deploy
|
10
|
-
set_callback :assert_instance_branch, :after, :run_installer
|
11
|
-
|
12
|
-
def run_installer
|
13
|
-
infom 'Running installer'
|
14
|
-
::EacRubyUtils::Ruby.on_clean_environment do
|
15
|
-
installer_command.system!
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def installer_command
|
20
|
-
instance.host_env.command(installer_path, install_task)
|
21
|
-
end
|
22
|
-
|
23
|
-
def installer_path
|
24
|
-
::File.join(instance.read_entry(:fs_path), 'plugins', 'redmine_installer', 'installer',
|
25
|
-
'run.sh')
|
26
|
-
end
|
27
|
-
|
28
|
-
def install_task
|
29
|
-
if instance.read_entry_optional('web.path').present?
|
30
|
-
'redmine_as_apache_path'
|
31
|
-
else
|
32
|
-
'redmine_as_apache_base'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/stereotypes/eac_redmine_base0/data_unit'
|
4
|
-
require 'avm/stereotypes/eac_ubuntu_base0/docker_image'
|
5
|
-
require 'avm/stereotypes/eac_webapp_base0/instance'
|
6
|
-
require 'avm/stereotypes/rails/instance'
|
7
|
-
|
8
|
-
module Avm
|
9
|
-
module Stereotypes
|
10
|
-
module EacRedmineBase0
|
11
|
-
class Instance < ::Avm::Stereotypes::EacWebappBase0::Instance
|
12
|
-
include ::Avm::Stereotypes::Rails::Instance
|
13
|
-
|
14
|
-
FILES_UNITS = { files: 'files' }.freeze
|
15
|
-
|
16
|
-
def docker_image_class
|
17
|
-
::Avm::Stereotypes::EacUbuntuBase0::DockerImage
|
18
|
-
end
|
19
|
-
|
20
|
-
def docker_run_arguments
|
21
|
-
[
|
22
|
-
'--volume', "#{read_entry(:fs_path)}:/home/myuser/eac_redmine_base0",
|
23
|
-
'--publish', "#{read_entry(:ssh_port)}:22",
|
24
|
-
'--publish', "#{read_entry(:http_port)}:80",
|
25
|
-
'--publish', "#{read_entry(:https_port)}:443"
|
26
|
-
]
|
27
|
-
end
|
28
|
-
|
29
|
-
def data_package
|
30
|
-
@data_package ||= ::Avm::Data::Instance::Package.new(
|
31
|
-
self,
|
32
|
-
units: {
|
33
|
-
all: ::Avm::Stereotypes::EacRedmineBase0::DataUnit.new(self)
|
34
|
-
}
|
35
|
-
)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
data/lib/eac_launcher/runner.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
4
|
-
require 'eac_launcher/runner/instances'
|
5
|
-
require 'eac_launcher/runner/projects'
|
6
|
-
require 'eac_launcher/runner/publish'
|
7
|
-
|
8
|
-
module EacLauncher
|
9
|
-
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
10
|
-
DOC = <<~DOCOPT
|
11
|
-
Utilities to deploy applications and libraries.
|
12
|
-
|
13
|
-
Usage:
|
14
|
-
__PROGRAM__ [options] __SUBCOMMANDS__
|
15
|
-
__PROGRAM__ -h | --help
|
16
|
-
|
17
|
-
Options:
|
18
|
-
-h --help Show this screen.
|
19
|
-
DOCOPT
|
20
|
-
end
|
21
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_launcher/instances/runner_helper'
|
4
|
-
|
5
|
-
module EacLauncher
|
6
|
-
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
7
|
-
class Instances < ::EacLauncher::Instances::RunnerHelper
|
8
|
-
DOC = <<~DOCOPT
|
9
|
-
Mostra informações sobre instâncias.
|
10
|
-
|
11
|
-
Usage:
|
12
|
-
__PROGRAM__ [options] [<instance_path>...]
|
13
|
-
__PROGRAM__ -h | --help
|
14
|
-
|
15
|
-
Options:
|
16
|
-
-h --help Show this screen.
|
17
|
-
--all Get all instances.
|
18
|
-
--recache Rewrite instances cache.
|
19
|
-
|
20
|
-
DOCOPT
|
21
|
-
|
22
|
-
def run
|
23
|
-
::EacLauncher::Context.current.recache = options['--recache']
|
24
|
-
instances.each { |i| show_instance(i) }
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def show_instance(instance)
|
30
|
-
puts instance_label(instance)
|
31
|
-
infov(' * Parent', (instance.parent ? instance_label(instance.parent) : '-'))
|
32
|
-
infov(' * Git current revision', instance.options.git_current_revision)
|
33
|
-
infov(' * Git publish remote', instance.options.git_publish_remote)
|
34
|
-
end
|
35
|
-
|
36
|
-
def instance_path
|
37
|
-
options['<instance_path>']
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_launcher/context'
|
4
|
-
require 'eac_launcher/instances/runner_helper'
|
5
|
-
|
6
|
-
module EacLauncher
|
7
|
-
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
8
|
-
class Projects < ::EacLauncher::Instances::RunnerHelper
|
9
|
-
DOC = <<~DOCOPT
|
10
|
-
Shows available projects.
|
11
|
-
|
12
|
-
Usage:
|
13
|
-
__PROGRAM__ [options]
|
14
|
-
__PROGRAM__ -h | --help
|
15
|
-
|
16
|
-
Options:
|
17
|
-
-h --help Show this screen.
|
18
|
-
-i --instances Show instances.
|
19
|
-
--recache Rewrite instances cache.
|
20
|
-
|
21
|
-
DOCOPT
|
22
|
-
|
23
|
-
def run
|
24
|
-
::EacLauncher::Context.current.recache = options['--recache']
|
25
|
-
::EacLauncher::Context.current.projects.each do |p|
|
26
|
-
show_project(p)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
def show_project(project)
|
33
|
-
puts project_label(project)
|
34
|
-
return unless options['--instances']
|
35
|
-
|
36
|
-
project.instances.each do |i|
|
37
|
-
puts " * #{instance_label(i)}"
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def project_label(project)
|
42
|
-
project.to_s.cyan.to_s
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module EacLauncher
|
4
|
-
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
5
|
-
class Publish < ::EacLauncher::Instances::RunnerHelper
|
6
|
-
DOC = <<~DOCOPT
|
7
|
-
Publica projetos ou instâncias.
|
8
|
-
|
9
|
-
Usage:
|
10
|
-
__PROGRAM__ [options] [<instance_path>...]
|
11
|
-
__PROGRAM__ -h | --help
|
12
|
-
|
13
|
-
Options:
|
14
|
-
-h --help Show this screen.
|
15
|
-
--new Publish projects not published before.
|
16
|
-
-s --stereotype=<st> Publish only for stereotype <stereotype>.
|
17
|
-
--all Publish all instances.
|
18
|
-
-d --dry-run "Dry run" publishing.
|
19
|
-
--pending Publish only pending.
|
20
|
-
--recache Rewrite instances cache.
|
21
|
-
--run Confirm publishing.
|
22
|
-
|
23
|
-
DOCOPT
|
24
|
-
|
25
|
-
def run
|
26
|
-
::EacLauncher::Context.current.recache = options['--recache']
|
27
|
-
build_publish_options
|
28
|
-
instances.each do |i|
|
29
|
-
next unless i.options.publishable?
|
30
|
-
|
31
|
-
i.send(instance_method)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def dry_run?
|
38
|
-
options.fetch('--dry-run')
|
39
|
-
end
|
40
|
-
|
41
|
-
def instance_method
|
42
|
-
run? || dry_run? ? 'publish_run' : 'publish_check'
|
43
|
-
end
|
44
|
-
|
45
|
-
def build_publish_options
|
46
|
-
::EacLauncher::Context.current.publish_options = publish_options
|
47
|
-
end
|
48
|
-
|
49
|
-
def publish_options
|
50
|
-
{ new: options.fetch('--new'), stereotype: options.fetch('--stereotype'),
|
51
|
-
confirm: run? }
|
52
|
-
end
|
53
|
-
|
54
|
-
def run?
|
55
|
-
options.fetch('--run') && !dry_run?
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|