avm-tools 0.73.0 → 0.76.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/{stereotypes/eac_rails_base0.rb → eac_rails_base0.rb} +1 -3
  3. data/lib/avm/eac_rails_base0/instance.rb +2 -5
  4. data/lib/avm/{rails/runners.rb → eac_rails_base1.rb} +2 -4
  5. data/lib/avm/{rails → eac_rails_base1}/instance.rb +8 -3
  6. data/lib/avm/eac_rails_base1/runner.rb +12 -0
  7. data/lib/avm/eac_rails_base1/runner/bundle.rb +28 -0
  8. data/lib/avm/eac_rails_base1/runner/code_runner.rb +28 -0
  9. data/lib/avm/eac_rails_base1/runner_with/bundle.rb +57 -0
  10. data/lib/avm/{stereotypes/rails.rb → eac_redmine_base0.rb} +2 -4
  11. data/lib/avm/eac_redmine_base0/instance.rb +2 -4
  12. data/lib/avm/{stereotypes/eac_ubuntu_base0.rb → eac_ubuntu_base0.rb} +1 -3
  13. data/lib/avm/{stereotypes/eac_webapp_base0.rb → eac_webapp_base0.rb} +1 -3
  14. data/lib/avm/eac_webapp_base0/deploy.rb +17 -40
  15. data/lib/avm/eac_webapp_base0/deploy/build.rb +48 -0
  16. data/lib/avm/eac_webapp_base0/deploy/git_info.rb +13 -0
  17. data/lib/avm/eac_webapp_base0/deploy/version.rb +4 -0
  18. data/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +18 -0
  19. data/lib/avm/eac_webapp_base0/instance.rb +2 -2
  20. data/lib/avm/eac_webapp_base0/runner.rb +12 -0
  21. data/lib/avm/eac_webapp_base0/runner/apache_host.rb +2 -3
  22. data/lib/avm/eac_webapp_base0/runner/data.rb +1 -1
  23. data/lib/avm/eac_webapp_base0/runner/data/dump.rb +1 -1
  24. data/lib/avm/eac_webapp_base0/runner/data/load.rb +1 -1
  25. data/lib/avm/eac_webapp_base0/runner/deploy.rb +4 -16
  26. data/lib/avm/eac_wordpress_base0.rb +9 -0
  27. data/lib/avm/eac_wordpress_base0/apache_host.rb +25 -0
  28. data/lib/avm/eac_wordpress_base0/deploy.rb +10 -0
  29. data/lib/avm/eac_wordpress_base0/instance.rb +24 -0
  30. data/lib/avm/eac_writings_base0.rb +9 -0
  31. data/lib/avm/eac_writings_base0/apache_host.rb +17 -0
  32. data/lib/avm/eac_writings_base0/commons.rb +12 -0
  33. data/lib/avm/eac_writings_base0/deploy.rb +36 -0
  34. data/lib/avm/eac_writings_base0/file_build.rb +45 -0
  35. data/lib/avm/eac_writings_base0/file_build/base_stereotype.rb +19 -0
  36. data/lib/avm/eac_writings_base0/file_build/chapter_index.rb +23 -0
  37. data/lib/avm/eac_writings_base0/file_build/tex_source.rb +33 -0
  38. data/lib/avm/eac_writings_base0/instance.rb +11 -0
  39. data/lib/avm/eac_writings_base0/project.rb +33 -0
  40. data/lib/avm/eac_writings_base0/project_build.rb +117 -0
  41. data/lib/avm/eac_writings_base0/project_build/chapters_content.rb +47 -0
  42. data/lib/avm/eac_writings_base0/project_build/copy_files.rb +42 -0
  43. data/lib/avm/executables.rb +1 -1
  44. data/lib/avm/files/appendable.rb +55 -0
  45. data/lib/avm/files/appendable/file_content.rb +24 -0
  46. data/lib/avm/files/appendable/plain_directory.rb +25 -0
  47. data/lib/avm/files/appendable/resource_base.rb +13 -0
  48. data/lib/avm/files/appendable/tar_output_command.rb +26 -0
  49. data/lib/avm/files/appendable/templatized_directory.rb +28 -0
  50. data/lib/avm/files/appender.rb +11 -0
  51. data/lib/avm/files/deploy.rb +72 -0
  52. data/lib/avm/files/formatter.rb +8 -4
  53. data/lib/avm/git/auto_commit_path.rb +2 -4
  54. data/lib/avm/git/auto_commit_path/ruby.rb +20 -0
  55. data/lib/avm/git/commit/deploy.rb +8 -61
  56. data/lib/avm/instances/runner.rb +40 -0
  57. data/lib/avm/{stereotypes/postgresql.rb → postgresql.rb} +1 -3
  58. data/lib/avm/postgresql/instance.rb +63 -0
  59. data/lib/avm/postgresql/instance/data_unit.rb +39 -0
  60. data/lib/avm/postgresql/instance_with.rb +18 -0
  61. data/lib/avm/projects/stereotypes/git_subtree/publish.rb +2 -0
  62. data/lib/avm/projects/stereotypes/git_subtree/warp.rb +3 -0
  63. data/lib/avm/tools/runner.rb +3 -3
  64. data/lib/avm/tools/runner/eac_rails_base0.rb +5 -18
  65. data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +1 -1
  66. data/lib/avm/tools/runner/eac_rails_base0/rails_server.rb +7 -12
  67. data/lib/avm/tools/runner/eac_rails_base0/runner.rb +3 -3
  68. data/lib/avm/tools/runner/eac_redmine_base0.rb +5 -23
  69. data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
  70. data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +1 -1
  71. data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +3 -3
  72. data/lib/avm/tools/runner/eac_wordpress_base0.rb +5 -24
  73. data/lib/avm/tools/runner/{eac_rails_base0/data.rb → eac_writings_base0.rb} +4 -4
  74. data/lib/avm/tools/runner/files/format.rb +3 -2
  75. data/lib/avm/tools/runner/git/auto_commit.rb +11 -0
  76. data/lib/avm/tools/runner/git/deploy.rb +1 -1
  77. data/lib/avm/tools/runner/local_project/eac_writings_base0.rb +35 -0
  78. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb +48 -0
  79. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb +37 -0
  80. data/lib/avm/tools/runner/local_project/eac_writings_base0/info.rb +36 -0
  81. data/lib/avm/tools/version.rb +1 -1
  82. data/template/avm/{stereotypes/eac_ubuntu_base0 → eac_ubuntu_base0}/docker_image/Dockerfile +0 -0
  83. data/template/avm/{stereotypes/eac_wordpress_base0 → eac_wordpress_base0}/deploy/wp-config.php.template +0 -0
  84. data/template/avm/eac_writings_base0/commons/all.tex +5 -0
  85. data/template/avm/eac_writings_base0/commons/ebook.tex +11 -0
  86. data/template/avm/eac_writings_base0/commons/images.tex +11 -0
  87. data/template/avm/eac_writings_base0/commons/links.tex +2 -0
  88. data/template/avm/eac_writings_base0/commons/portuguese.tex +8 -0
  89. data/template/avm/eac_writings_base0/commons/source_code.tex +21 -0
  90. data/template/avm/eac_writings_base0/commons/source_code/java.tex +15 -0
  91. data/template/avm/eac_writings_base0/commons/utils.tex +6 -0
  92. data/template/avm/eac_writings_base0/deploy/index.html.template +9 -0
  93. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb +4 -39
  94. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb +41 -0
  95. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb +57 -0
  96. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +4 -0
  97. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  98. metadata +64 -36
  99. data/lib/avm/git/commit/deploy/appended.rb +0 -37
  100. data/lib/avm/git/commit/deploy/appended/base.rb +0 -17
  101. data/lib/avm/git/commit/deploy/appended/directory.rb +0 -32
  102. data/lib/avm/git/commit/deploy/appended/file_content.rb +0 -28
  103. data/lib/avm/rails/runners/bundle.rb +0 -35
  104. data/lib/avm/rails/runners/runner.rb +0 -48
  105. data/lib/avm/stereotypes/eac_redmine_base0.rb +0 -11
  106. data/lib/avm/stereotypes/eac_wordpress_base0/apache_host.rb +0 -27
  107. data/lib/avm/stereotypes/eac_wordpress_base0/deploy.rb +0 -12
  108. data/lib/avm/stereotypes/eac_wordpress_base0/instance.rb +0 -26
  109. data/lib/avm/stereotypes/postgresql/instance.rb +0 -65
  110. data/lib/avm/stereotypes/postgresql/instance/data_unit.rb +0 -41
  111. data/lib/avm/stereotypes/postgresql/instance_with.rb +0 -20
  112. data/lib/avm/tools/runner/eac_rails_base0/apache_host.rb +0 -16
  113. data/lib/avm/tools/runner/eac_rails_base0/bundle.rb +0 -14
  114. data/lib/avm/tools/runner/eac_rails_base0/deploy.rb +0 -15
  115. data/lib/avm/tools/runner/eac_redmine_base0/bundle.rb +0 -14
  116. data/lib/avm/tools/runner/eac_redmine_base0/data.rb +0 -27
  117. data/lib/avm/tools/runner/eac_redmine_base0/data/dump.rb +0 -16
  118. data/lib/avm/tools/runner/eac_redmine_base0/deploy.rb +0 -15
  119. data/lib/avm/tools/runner/eac_redmine_base0/runner.rb +0 -14
  120. data/lib/avm/tools/runner/eac_wordpress_base0/apache_host.rb +0 -17
  121. data/lib/avm/tools/runner/eac_wordpress_base0/data.rb +0 -15
  122. data/lib/avm/tools/runner/eac_wordpress_base0/deploy.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af0f11c7a0f00c23780d97a299a822c01a7466d5f229d4c0cbe137d11dbce8c5
4
- data.tar.gz: 06d5dfc23be320ea36ccdf30af582effae03309c29377912760a23c832f7fac3
3
+ metadata.gz: 523777fd378f3ba655e65b12e452660f192e2875791439146808c472ee5cd982
4
+ data.tar.gz: 253dabfb78beaefa4b40dcfe6f669ae0e74761cb63a2e3418fda41ca8e107d2f
5
5
  SHA512:
6
- metadata.gz: e4b9ac7532a83c97b55c32d5655c6ae86d83d8b182eabbd9bc1dff629ca297c36c4190dea0c444b3b51dfb3a436368757b47feaa13e16ca40c8421b83966a25e
7
- data.tar.gz: f97b797046e7e73c40b15b6c789982c2fcc095d2a01a0cbd37e4db3f483433319e36b3fc40da872625f4de4c0a636983c31ca1e6dfc95c965324b433be2d3c07
6
+ metadata.gz: 7208ff787a4d219d9a66b9e6e978dbf51cb142ea6af94b4347f9fc7f56c478962113b775896d52351fc35bea6fad3b796c9d5387af70c491a56542cd42872d25
7
+ data.tar.gz: 77004875dc073ea43aca01a5a3c4bbbf178fed773056bae70206745ce6d677ebfdf797871a0e5a8196eac1fd30774ab49e0e6b7503009abc22e0f278e5e6aaf0
@@ -4,8 +4,6 @@ require 'eac_ruby_utils/require_sub'
4
4
  ::EacRubyUtils.require_sub(__FILE__)
5
5
 
6
6
  module Avm
7
- module Stereotypes
8
- module EacRailsBase0
9
- end
7
+ module EacRailsBase0
10
8
  end
11
9
  end
@@ -1,13 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_webapp_base0/instance'
4
- require 'avm/rails/instance'
3
+ require 'avm/eac_rails_base1/instance'
5
4
 
6
5
  module Avm
7
6
  module EacRailsBase0
8
- class Instance < ::Avm::EacWebappBase0::Instance
9
- include ::Avm::Rails::Instance
10
-
7
+ class Instance < ::Avm::EacRailsBase1::Instance
11
8
  FILES_UNITS = { uploads: 'public/uploads' }.freeze
12
9
  end
13
10
  end
@@ -3,9 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
- module Rails
7
- module Runners
8
- require_sub __FILE__
9
- end
6
+ module EacRailsBase1
7
+ require_sub __FILE__
10
8
  end
11
9
  end
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/eac_webapp_base0/instance'
4
+ require 'eac_ruby_gems_utils/gem'
5
+
3
6
  module Avm
4
- module Rails
5
- module Instance
7
+ module EacRailsBase1
8
+ class Instance < ::Avm::EacWebappBase0::Instance
9
+ DEFAULT_RAILS_ENVIRONMENT = 'production'
10
+
6
11
  def bundle(*args)
7
- the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV', 'production')
12
+ the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV', DEFAULT_RAILS_ENVIRONMENT)
8
13
  end
9
14
 
10
15
  def rake(*args)
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/runner'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ class Runner < ::Avm::EacWebappBase0::Runner
9
+ require_sub __FILE__
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/bundle'
4
+ require 'eac_cli/core_ext'
5
+ require 'eac_ruby_utils/console/docopt_runner'
6
+ require 'shellwords'
7
+
8
+ module Avm
9
+ module EacRailsBase1
10
+ class Runner < ::Avm::EacWebappBase0::Runner
11
+ class Bundle
12
+ runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle
13
+ runner_definition do
14
+ desc 'Runs "bundle ...".'
15
+ pos_arg :'bundle-args', repeat: true, optional: true
16
+ end
17
+
18
+ def run
19
+ bundle_run
20
+ end
21
+
22
+ def bundle_args
23
+ parsed.bundle_args.reject { |arg| arg == '--' }
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/runner_with/bundle'
4
+ require 'eac_cli/core_ext'
5
+ require 'eac_ruby_utils/console/docopt_runner'
6
+
7
+ module Avm
8
+ module EacRailsBase1
9
+ class Runner < ::Avm::EacWebappBase0::Runner
10
+ class CodeRunner
11
+ runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle
12
+ runner_definition do
13
+ desc 'Runs a Ruby code with "rails runner".'
14
+ pos_arg :code
15
+ end
16
+
17
+ def run
18
+ infov 'Environment', runner_context.call(:instance).host_env
19
+ bundle_run
20
+ end
21
+
22
+ def bundle_args
23
+ %w[exec rails runner] + [parsed.code]
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/instance'
4
+ require 'eac_cli/runner'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ module RunnerWith
9
+ module Bundle
10
+ DEFAULT_RAILS_ENVIRONMENT_CONSTANT = 'DEFAULT_RAILS_ENVIRONMENT'
11
+
12
+ common_concern do
13
+ include ::EacCli::Runner
14
+
15
+ runner_definition do
16
+ arg_opt '-e', '--environment', 'Specifies the environment for the runner to operate' \
17
+ ' (test/development/production). Default: "development".'
18
+ end
19
+ end
20
+
21
+ module ClassMethods
22
+ def default_rails_environment
23
+ const_get(DEFAULT_RAILS_ENVIRONMENT_CONSTANT)
24
+ rescue ::NameError
25
+ ::Avm::EacRailsBase1::Instance::DEFAULT_RAILS_ENVIRONMENT
26
+ end
27
+ end
28
+
29
+ def bundle_command
30
+ rails_instance.bundle(*bundle_args).envvar('RAILS_ENV', rails_environment)
31
+ end
32
+
33
+ def bundle_run
34
+ infov 'Bundle arguments', ::Shellwords.join(bundle_args)
35
+ infov 'Rails environment', rails_environment
36
+ bundle_command.system!
37
+ end
38
+
39
+ def default_rails_environment
40
+ self.class.default_rails_environment
41
+ end
42
+
43
+ def rails_instance
44
+ if respond_to?(:runner_context)
45
+ runner_context.call(:instance)
46
+ else
47
+ context(:instance)
48
+ end
49
+ end
50
+
51
+ def rails_environment
52
+ parsed.environment.presence || default_rails_environment
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -3,9 +3,7 @@
3
3
  require 'eac_ruby_utils/require_sub'
4
4
 
5
5
  module Avm
6
- module Stereotypes
7
- module Rails
8
- ::EacRubyUtils.require_sub(__FILE__)
9
- end
6
+ module EacRedmineBase0
7
+ ::EacRubyUtils.require_sub(__FILE__)
10
8
  end
11
9
  end
@@ -3,13 +3,11 @@
3
3
  require 'avm/eac_redmine_base0/data_unit'
4
4
  require 'avm/eac_ubuntu_base0/docker_image'
5
5
  require 'avm/eac_webapp_base0/instance'
6
- require 'avm/rails/instance'
6
+ require 'avm/eac_rails_base1/instance'
7
7
 
8
8
  module Avm
9
9
  module EacRedmineBase0
10
- class Instance < ::Avm::EacWebappBase0::Instance
11
- include ::Avm::Rails::Instance
12
-
10
+ class Instance < ::Avm::EacRailsBase1::Instance
13
11
  FILES_UNITS = { files: 'files' }.freeze
14
12
 
15
13
  def docker_image_class
@@ -4,8 +4,6 @@ require 'eac_ruby_utils/require_sub'
4
4
  ::EacRubyUtils.require_sub(__FILE__)
5
5
 
6
6
  module Avm
7
- module Stereotypes
8
- module EacUbuntuBase0
9
- end
7
+ module EacUbuntuBase0
10
8
  end
11
9
  end
@@ -4,8 +4,6 @@ require 'eac_ruby_utils/require_sub'
4
4
  ::EacRubyUtils.require_sub(__FILE__)
5
5
 
6
6
  module Avm
7
- module Stereotypes
8
- module EacWebappBase0
9
- end
7
+ module EacWebappBase0
10
8
  end
11
9
  end
@@ -1,11 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/callbacks'
4
- require 'delegate'
5
- require 'eac_ruby_utils/core_ext'
6
- require 'eac_launcher/git/base'
7
4
  require 'avm/git'
8
5
  require 'avm/patches/object/template'
6
+ require 'eac_ruby_utils/core_ext'
7
+ require 'eac_launcher/git/base'
9
8
  require 'net/http'
10
9
 
11
10
  module Avm
@@ -18,34 +17,20 @@ module Avm
18
17
 
19
18
  enable_console_speaker
20
19
  enable_simple_cache
20
+ common_constructor :instance, :options, default: [{}]
21
21
 
22
- JOBS = %w[git_deploy setup_files_units assert_instance_branch request_test].freeze
22
+ JOBS = %w[create_build_dir build_content append_instance_content write_on_target
23
+ setup_files_units assert_instance_branch request_test].freeze
23
24
  define_callbacks(*JOBS)
24
25
 
25
- attr_reader :instance, :options
26
-
27
- def initialize(instance, options = {})
28
- @instance = instance
29
- @options = options
30
- end
31
-
32
- def build_git_commit
33
- ::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
34
- instance.host_env,
35
- instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
36
- ).variables_source_set(instance)
37
- end
38
-
39
26
  def run
40
27
  start_banner
41
- JOBS.each do |job|
42
- run_callbacks job do
43
- send(job)
44
- end
45
- end
28
+ run_jobs
46
29
  ::Avm::Result.success('Deployed')
47
30
  rescue ::Avm::Result::Error => e
48
31
  e.to_result
32
+ ensure
33
+ remove_build_dir
49
34
  end
50
35
 
51
36
  def start_banner
@@ -57,15 +42,6 @@ module Avm
57
42
  infov 'Appended directories', appended_directories
58
43
  end
59
44
 
60
- def git_deploy
61
- infom 'Deploying source code and appended content...'
62
- build_git_commit
63
- .append_directory(template.path)
64
- .append_directories(appended_directories)
65
- .append_file_content(VERSION_TARGET_PATH, version)
66
- .run
67
- end
68
-
69
45
  def setup_files_units
70
46
  instance.class.const_get('FILES_UNITS').each do |data_key, fs_path_subpath|
71
47
  FileUnit.new(self, data_key, fs_path_subpath).run
@@ -85,17 +61,18 @@ module Avm
85
61
  fatal_error "Request to #{uri} failed" unless response.code.to_i == 200
86
62
  end
87
63
 
88
- def git_uncached
89
- ::EacLauncher::Git::Base.new(git_repository_path)
64
+ def variables_source
65
+ instance
90
66
  end
91
67
 
92
- def git_fetch_uncached
93
- infom "Fetching remote \"#{git_remote_name}\" from \"#{git_repository_path}\"..."
94
- git.fetch(git_remote_name)
95
- end
68
+ private
96
69
 
97
- def git_repository_path
98
- instance.source_instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
70
+ def run_jobs
71
+ JOBS.each do |job|
72
+ run_callbacks job do
73
+ send(job)
74
+ end
75
+ end
99
76
  end
100
77
  end
101
78
  end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/files/appender'
4
+ require 'avm/files/deploy'
5
+ require 'eac_ruby_utils/envs'
6
+ require 'eac_ruby_utils/fs/temp'
7
+
8
+ module Avm
9
+ module EacWebappBase0
10
+ class Deploy
11
+ module Build
12
+ private
13
+
14
+ attr_accessor :build_dir
15
+
16
+ def append_instance_content
17
+ ::Avm::Files::Appender
18
+ .new
19
+ .variables_source_set(variables_source)
20
+ .append_templatized_directory(template.path)
21
+ .append_templatized_directories(appended_directories)
22
+ .append_file_content(version_target_path, version)
23
+ .write_appended_on(build_dir)
24
+ end
25
+
26
+ def build_dir_env
27
+ ::EacRubyUtils::Envs.local
28
+ end
29
+
30
+ def create_build_dir
31
+ self.build_dir = ::EacRubyUtils::Fs::Temp.directory
32
+ end
33
+
34
+ def remove_build_dir
35
+ build_dir&.remove
36
+ end
37
+
38
+ def build_content
39
+ infom 'Writing Git source code...'
40
+ ::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
41
+ build_dir_env,
42
+ build_dir
43
+ ).variables_source_set(variables_source).run
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -12,6 +12,11 @@ module Avm
12
12
  raise ::Avm::Result::Error, "No commit SHA1 found for \"#{git_reference_found}\""
13
13
  end
14
14
 
15
+ def git_fetch_uncached
16
+ infom "Fetching remote \"#{git_remote_name}\" from \"#{git_repository_path}\"..."
17
+ git.fetch(git_remote_name)
18
+ end
19
+
15
20
  def git_reference
16
21
  options[:reference] || DEFAULT_REFERENCE
17
22
  end
@@ -32,6 +37,14 @@ module Avm
32
37
  ::Avm::Git::DEFAULT_REMOTE_NAME
33
38
  end
34
39
 
40
+ def git_repository_path
41
+ instance.source_instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
42
+ end
43
+
44
+ def git_uncached
45
+ ::EacLauncher::Git::Base.new(git_repository_path)
46
+ end
47
+
35
48
  def instance_branch
36
49
  remote_branch(instance.id)
37
50
  end
@@ -14,6 +14,10 @@ module Avm
14
14
  git_remote_hashs.select { |_name, sha1| sha1 == commit_sha1 }.keys
15
15
  .map { |ref| ref.gsub(%r{\Arefs/}, '') }.reject { |ref| ref == 'HEAD' }
16
16
  end
17
+
18
+ def version_target_path
19
+ VERSION_TARGET_PATH
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacWebappBase0
7
+ class Deploy
8
+ module WriteOnTarget
9
+ def write_on_target
10
+ ::Avm::Files::Deploy.new(
11
+ instance.host_env,
12
+ instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
13
+ ).append_plain_directory(build_dir).run
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end