avmtrf1-tools 0.33.0 → 0.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avmtrf1/active_directory/user.rb +3 -3
- data/lib/avmtrf1/core_ext.rb +4 -0
- data/lib/avmtrf1/default_jira.rb +2 -2
- data/lib/avmtrf1/git/cached_repository.rb +2 -2
- data/lib/avmtrf1/git/issue_on_repository.rb +2 -2
- data/lib/avmtrf1/git/push_large.rb +4 -4
- data/lib/avmtrf1/git/push_large/lfs_commit.rb +5 -10
- data/lib/avmtrf1/git/push_large/lfs_commit/cache.rb +19 -0
- data/lib/avmtrf1/git/push_large/lfs_commit/checkout_previous_revision.rb +35 -0
- data/lib/avmtrf1/git/push_large/lfs_commit/commit_changes.rb +48 -0
- data/lib/avmtrf1/git/push_large/lfs_commit/helpers.rb +29 -0
- data/lib/avmtrf1/git/push_large/lfs_commit/pick_source_revision.rb +103 -0
- data/lib/avmtrf1/git/push_large/lfs_commit/push.rb +90 -0
- data/lib/avmtrf1/git/push_large/lfs_commit/track_large_files.rb +53 -0
- data/lib/avmtrf1/git/push_large/source_commit.rb +4 -7
- data/lib/avmtrf1/git/push_large/source_commit/push.rb +42 -0
- data/lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb +1 -1
- data/lib/avmtrf1/patches.rb +3 -0
- data/lib/avmtrf1/patches/avm.rb +4 -0
- data/lib/avmtrf1/patches/avm/git.rb +4 -0
- data/lib/avmtrf1/patches/avm/git/issue.rb +4 -0
- data/lib/avmtrf1/patches/avm/launcher.rb +4 -0
- data/lib/avmtrf1/patches/avm/launcher/git.rb +4 -0
- data/lib/avmtrf1/patches/avm/launcher/git/base.rb +46 -0
- data/lib/avmtrf1/red/helper.rb +2 -2
- data/lib/avmtrf1/template.rb +2 -2
- data/lib/avmtrf1/tools/runner.rb +5 -2
- data/lib/avmtrf1/tools/runner/check_point.rb +2 -2
- data/lib/avmtrf1/tools/runner/check_point/login.rb +5 -5
- data/lib/avmtrf1/tools/runner/esosti.rb +3 -3
- data/lib/avmtrf1/tools/runner/esosti/changed.rb +4 -4
- data/lib/avmtrf1/tools/runner/esosti/fetch.rb +4 -4
- data/lib/avmtrf1/tools/runner/esosti/request.rb +4 -4
- data/lib/avmtrf1/tools/runner/forponto.rb +6 -6
- data/lib/avmtrf1/tools/runner/forponto/espelho.rb +5 -5
- data/lib/avmtrf1/tools/runner/forponto/marcacoes.rb +4 -4
- data/lib/avmtrf1/tools/runner/forponto/resumos.rb +5 -5
- data/lib/avmtrf1/tools/runner/forponto/saldo.rb +5 -5
- data/lib/avmtrf1/tools/runner/git.rb +1 -1
- data/lib/avmtrf1/tools/runner/git/issues_check.rb +7 -18
- data/lib/avmtrf1/tools/runner/git/push_large.rb +27 -18
- data/lib/avmtrf1/tools/runner/oracle.rb +15 -22
- data/lib/avmtrf1/tools/runner/oracle/query.rb +10 -12
- data/lib/avmtrf1/tools/runner/oracle/source_get.rb +17 -18
- data/lib/avmtrf1/tools/runner/oracle/user_clear.rb +7 -15
- data/lib/avmtrf1/tools/runner/php/docker.rb +3 -3
- data/lib/avmtrf1/tools/runner/red.rb +21 -25
- data/lib/avmtrf1/tools/runner/trf1_dspace_base0.rb +9 -18
- data/lib/avmtrf1/tools/runner/trf1_dspace_base0/deploy.rb +1 -1
- data/lib/avmtrf1/tools/version.rb +1 -1
- metadata +22 -93
- data/lib/avmtrf1/configs.rb +0 -24
- data/lib/avmtrf1/git/push_large/lfs_commit/_00_checkout_previous_revision.rb +0 -33
- data/lib/avmtrf1/git/push_large/lfs_commit/_01_cherry_pick_source_revision.rb +0 -89
- data/lib/avmtrf1/git/push_large/lfs_commit/_02_track_large_files.rb +0 -51
- data/lib/avmtrf1/git/push_large/lfs_commit/_03_commit_changes.rb +0 -46
- data/lib/avmtrf1/git/push_large/lfs_commit/_04_push.rb +0 -88
- data/lib/avmtrf1/git/push_large/lfs_commit/_cache.rb +0 -17
- data/lib/avmtrf1/git/push_large/lfs_commit/_helpers.rb +0 -27
- data/lib/avmtrf1/git/push_large/source_commit/_push.rb +0 -40
- data/lib/avmtrf1/patches/eac_launcher/git/base.rb +0 -43
@@ -1,34 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_ruby_utils/console/speaker'
|
5
|
-
require 'eac_ruby_utils/simple_cache'
|
3
|
+
require 'avmtrf1/core_ext'
|
6
4
|
require 'avmtrf1/ini'
|
7
5
|
require 'avmtrf1/red/profile'
|
8
6
|
|
9
7
|
module Avmtrf1
|
10
8
|
module Tools
|
11
9
|
class Runner
|
12
|
-
class Red
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
10
|
+
class Red
|
11
|
+
RED_PROFILE_DEFAULT = 'development'
|
12
|
+
|
13
|
+
runner_with :help do
|
14
|
+
desc 'Utilidades para RED.'
|
15
|
+
arg_opt '-i', '--red-ini', 'Arquivo red.ini com parâmetros de conexão e upload.'
|
16
|
+
arg_opt '-p', '--red-profile', 'Perfil/seção do red.ini' \
|
17
|
+
" [default: #{RED_PROFILE_DEFAULT}]."
|
18
|
+
arg_opt '--put', 'Envia um arquivo.'
|
19
|
+
end
|
22
20
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
-p --red-profile=<red-profile> Perfil/seção do red.ini [default: development].
|
27
|
-
DOCOPT
|
21
|
+
def put?
|
22
|
+
parsed.put.present?
|
23
|
+
end
|
28
24
|
|
29
25
|
def run
|
30
26
|
start_banner
|
31
|
-
if
|
27
|
+
if put?
|
32
28
|
file_put
|
33
29
|
else
|
34
30
|
fatal_error('Subcomando não mapeado (Isto é um defeito do software)')
|
@@ -36,9 +32,9 @@ module Avmtrf1
|
|
36
32
|
end
|
37
33
|
|
38
34
|
def start_banner
|
39
|
-
infov 'red.ini',
|
35
|
+
infov 'red.ini', parsed.red_ini
|
40
36
|
infov 'Perfil de red.ini', red_profile_name
|
41
|
-
infov 'Arquivo para upload',
|
37
|
+
infov 'Arquivo para upload', parsed.put
|
42
38
|
end
|
43
39
|
|
44
40
|
def file_put
|
@@ -50,7 +46,7 @@ module Avmtrf1
|
|
50
46
|
end
|
51
47
|
|
52
48
|
def red_profile_name
|
53
|
-
|
49
|
+
parsed.red_profile.if_present(RED_PROFILE_DEFAULT)
|
54
50
|
end
|
55
51
|
|
56
52
|
def red_profile_uncached
|
@@ -58,11 +54,11 @@ module Avmtrf1
|
|
58
54
|
end
|
59
55
|
|
60
56
|
def file
|
61
|
-
required_file(
|
57
|
+
required_file(:put)
|
62
58
|
end
|
63
59
|
|
64
60
|
def red_ini_path_uncached
|
65
|
-
required_file(
|
61
|
+
required_file(:red_ini)
|
66
62
|
end
|
67
63
|
|
68
64
|
def red_ini_uncached
|
@@ -76,7 +72,7 @@ module Avmtrf1
|
|
76
72
|
end
|
77
73
|
|
78
74
|
def required_file(option_key)
|
79
|
-
path =
|
75
|
+
path = parsed[option_key]
|
80
76
|
return path if path
|
81
77
|
|
82
78
|
fatal_error("Arquivo \"#{path}\" não existe (Informado na opção #{option_key})")
|
@@ -1,32 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
3
|
+
require 'avmtrf1/core_ext'
|
5
4
|
require 'avmtrf1/trf1_dspace_base0/instance'
|
6
5
|
|
7
6
|
module Avmtrf1
|
8
7
|
module Tools
|
9
8
|
class Runner
|
10
|
-
class Trf1DspaceBase0
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
Usage:
|
19
|
-
__PROGRAM__ [options] <instance_id> __SUBCOMMANDS__
|
20
|
-
__PROGRAM__ -h | --help
|
21
|
-
|
22
|
-
Options:
|
23
|
-
-h --help Show this screen.
|
24
|
-
DOCOPT
|
9
|
+
class Trf1DspaceBase0
|
10
|
+
require_sub __FILE__
|
11
|
+
runner_with :help, :subcommands do
|
12
|
+
desc 'Utilities for Trf1DspaceBase0 instances.'
|
13
|
+
pos_arg :instance_id
|
14
|
+
subcommands
|
15
|
+
end
|
25
16
|
|
26
17
|
private
|
27
18
|
|
28
19
|
def instance_uncached
|
29
|
-
::Avmtrf1::Trf1DspaceBase0::Instance.by_id(
|
20
|
+
::Avmtrf1::Trf1DspaceBase0::Instance.by_id(parsed.instance_id)
|
30
21
|
end
|
31
22
|
end
|
32
23
|
end
|
@@ -6,7 +6,7 @@ require 'avm/eac_webapp_base0/runner/deploy'
|
|
6
6
|
module Avmtrf1
|
7
7
|
module Tools
|
8
8
|
class Runner
|
9
|
-
class Trf1DspaceBase0
|
9
|
+
class Trf1DspaceBase0
|
10
10
|
class Deploy < ::Avm::EacWebappBase0::Runner::Deploy
|
11
11
|
def stereotype_module
|
12
12
|
::Avmtrf1::Trf1DspaceBase0
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avmtrf1-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.33.
|
4
|
+
version: 0.33.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: aranha-parsers
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.4'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.4'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: aranha-selenium
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,82 +36,20 @@ dependencies:
|
|
50
36
|
requirements:
|
51
37
|
- - "~>"
|
52
38
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
39
|
+
version: '0.102'
|
54
40
|
- - ">="
|
55
41
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
42
|
+
version: 0.102.1
|
57
43
|
type: :runtime
|
58
44
|
prerelease: false
|
59
45
|
version_requirements: !ruby/object:Gem::Requirement
|
60
46
|
requirements:
|
61
47
|
- - "~>"
|
62
48
|
- !ruby/object:Gem::Version
|
63
|
-
version: '0.
|
49
|
+
version: '0.102'
|
64
50
|
- - ">="
|
65
51
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: curb
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: 0.9.10
|
74
|
-
type: :runtime
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.9.10
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: eac_cli
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0.3'
|
88
|
-
type: :runtime
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '0.3'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: eac_ruby_utils
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0.51'
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 0.51.1
|
105
|
-
type: :runtime
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0.51'
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 0.51.1
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: filesize
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0'
|
122
|
-
type: :runtime
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
52
|
+
version: 0.102.1
|
129
53
|
- !ruby/object:Gem::Dependency
|
130
54
|
name: inifile
|
131
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -230,7 +154,7 @@ files:
|
|
230
154
|
- lib/avmtrf1/check_point.rb
|
231
155
|
- lib/avmtrf1/check_point/session.rb
|
232
156
|
- lib/avmtrf1/check_point/session/login.rb
|
233
|
-
- lib/avmtrf1/
|
157
|
+
- lib/avmtrf1/core_ext.rb
|
234
158
|
- lib/avmtrf1/default_esosti.rb
|
235
159
|
- lib/avmtrf1/default_jira.rb
|
236
160
|
- lib/avmtrf1/default_redmine.rb
|
@@ -273,15 +197,15 @@ files:
|
|
273
197
|
- lib/avmtrf1/git/push_large.rb
|
274
198
|
- lib/avmtrf1/git/push_large/_utils.rb
|
275
199
|
- lib/avmtrf1/git/push_large/lfs_commit.rb
|
276
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
277
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
278
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
279
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
280
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
281
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
282
|
-
- lib/avmtrf1/git/push_large/lfs_commit/
|
200
|
+
- lib/avmtrf1/git/push_large/lfs_commit/cache.rb
|
201
|
+
- lib/avmtrf1/git/push_large/lfs_commit/checkout_previous_revision.rb
|
202
|
+
- lib/avmtrf1/git/push_large/lfs_commit/commit_changes.rb
|
203
|
+
- lib/avmtrf1/git/push_large/lfs_commit/helpers.rb
|
204
|
+
- lib/avmtrf1/git/push_large/lfs_commit/pick_source_revision.rb
|
205
|
+
- lib/avmtrf1/git/push_large/lfs_commit/push.rb
|
206
|
+
- lib/avmtrf1/git/push_large/lfs_commit/track_large_files.rb
|
283
207
|
- lib/avmtrf1/git/push_large/source_commit.rb
|
284
|
-
- lib/avmtrf1/git/push_large/source_commit/
|
208
|
+
- lib/avmtrf1/git/push_large/source_commit/push.rb
|
285
209
|
- lib/avmtrf1/git/reference.rb
|
286
210
|
- lib/avmtrf1/ini.rb
|
287
211
|
- lib/avmtrf1/ini/profile.rb
|
@@ -325,8 +249,13 @@ files:
|
|
325
249
|
- lib/avmtrf1/oracle/objects/sql_builder.rb
|
326
250
|
- lib/avmtrf1/oracle/oci8.rb
|
327
251
|
- lib/avmtrf1/patches.rb
|
252
|
+
- lib/avmtrf1/patches/avm.rb
|
253
|
+
- lib/avmtrf1/patches/avm/git.rb
|
254
|
+
- lib/avmtrf1/patches/avm/git/issue.rb
|
328
255
|
- lib/avmtrf1/patches/avm/git/issue/complete.rb
|
329
|
-
- lib/avmtrf1/patches/
|
256
|
+
- lib/avmtrf1/patches/avm/launcher.rb
|
257
|
+
- lib/avmtrf1/patches/avm/launcher/git.rb
|
258
|
+
- lib/avmtrf1/patches/avm/launcher/git/base.rb
|
330
259
|
- lib/avmtrf1/patches/inifile.rb
|
331
260
|
- lib/avmtrf1/php.rb
|
332
261
|
- lib/avmtrf1/php/docker_image.rb
|
@@ -417,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
417
346
|
- !ruby/object:Gem::Version
|
418
347
|
version: '0'
|
419
348
|
requirements: []
|
420
|
-
rubygems_version: 3.0.
|
349
|
+
rubygems_version: 3.0.9
|
421
350
|
signing_key:
|
422
351
|
specification_version: 4
|
423
352
|
summary: Ferramentas para AVM-TRF1.
|
data/lib/avmtrf1/configs.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/console/configs'
|
4
|
-
|
5
|
-
module Avmtrf1
|
6
|
-
CONFIGS_KEY = 'avm-trf1-tools'
|
7
|
-
|
8
|
-
class << self
|
9
|
-
attr_reader :configs_storage_path
|
10
|
-
|
11
|
-
def configs
|
12
|
-
@configs ||= ::EacRubyUtils::Console::Configs.new(CONFIGS_KEY, configs_options)
|
13
|
-
end
|
14
|
-
|
15
|
-
def configs_options
|
16
|
-
configs_storage_path.if_present({}) { |v| { storage_path: v } }
|
17
|
-
end
|
18
|
-
|
19
|
-
def configs_storage_path=(path)
|
20
|
-
@configs_storage_path = path
|
21
|
-
@configs = nil
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avmtrf1
|
4
|
-
module Git
|
5
|
-
class PushLarge
|
6
|
-
class LfsCommit
|
7
|
-
private
|
8
|
-
|
9
|
-
def checkout_base_uncached
|
10
|
-
if previous_revision.blank?
|
11
|
-
checkout_orphan
|
12
|
-
else
|
13
|
-
checkout_previous_revision
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def checkout_orphan
|
18
|
-
infom message('Checkout orphan')
|
19
|
-
git.execute!('reset', '--hard')
|
20
|
-
git.execute!('clean', '-df')
|
21
|
-
git.execute!('checkout', source_commit.sha1)
|
22
|
-
end
|
23
|
-
|
24
|
-
def checkout_previous_revision
|
25
|
-
infom message("Checkout previous revision #{previous_revision}")
|
26
|
-
git.execute!('reset', '--hard')
|
27
|
-
git.execute!('clean', '-df')
|
28
|
-
git.execute!('checkout', previous_revision)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,89 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avmtrf1
|
4
|
-
module Git
|
5
|
-
class PushLarge
|
6
|
-
class LfsCommit
|
7
|
-
private
|
8
|
-
|
9
|
-
def cherry_pick_source_revision_uncached
|
10
|
-
checkout_base
|
11
|
-
return unless previous_revision.present?
|
12
|
-
|
13
|
-
infom message("Cherry pick #{source_commit.sha1}")
|
14
|
-
result = git.execute('cherry-pick', '--allow-empty', '--allow-empty-message', '-Xtheirs',
|
15
|
-
source_commit.sha1)
|
16
|
-
check_cherry_pick_result(result)
|
17
|
-
end
|
18
|
-
|
19
|
-
def check_cherry_pick_result(result)
|
20
|
-
return if result.fetch(:exit_code).zero?
|
21
|
-
|
22
|
-
raise "Cherry pick failed: #{result}" unless cherry_pick_conflict?
|
23
|
-
|
24
|
-
warn message('Cherry pick failed with conflict')
|
25
|
-
resolve_cherry_pick_conflicts
|
26
|
-
|
27
|
-
check_dirty_files
|
28
|
-
check_cherry_continue
|
29
|
-
end
|
30
|
-
|
31
|
-
def cherry_pick_conflict?
|
32
|
-
::File.exist?(::File.join(git, '.git', 'CHERRY_PICK_HEAD'))
|
33
|
-
end
|
34
|
-
|
35
|
-
def resolve_cherry_pick_conflicts
|
36
|
-
git.status_files.each do |scf|
|
37
|
-
if scf.dirty == 'D'
|
38
|
-
remove_file(scf.path)
|
39
|
-
elsif scf.dirty.present?
|
40
|
-
add_file(scf.path)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def remove_file(path)
|
46
|
-
infov message('Removing file'), path
|
47
|
-
git.execute!('rm', path)
|
48
|
-
end
|
49
|
-
|
50
|
-
def add_file(path)
|
51
|
-
infov message('Adding file'), path
|
52
|
-
git.execute!('add', path)
|
53
|
-
end
|
54
|
-
|
55
|
-
def check_dirty_files
|
56
|
-
infom message('Checking dirty files...')
|
57
|
-
df = dirty_files
|
58
|
-
infov message('Dirty files?'), df.any?
|
59
|
-
return unless df.any?
|
60
|
-
|
61
|
-
df.each do |f|
|
62
|
-
infov message(f.path, 1), "|#{f.stage}|#{f.dirty}|"
|
63
|
-
end
|
64
|
-
raise 'There are dirty files'
|
65
|
-
end
|
66
|
-
|
67
|
-
def dirty_files
|
68
|
-
git.status_files.select { |scf| scf.dirty.present? }
|
69
|
-
end
|
70
|
-
|
71
|
-
def check_cherry_continue
|
72
|
-
infom message('Continuing cherry pick')
|
73
|
-
git.execute!('-c', "core.editor=#{bash_editor}", 'cherry-pick', '--continue')
|
74
|
-
raise 'Still in cherry-pick conflict' if cherry_pick_conflict?
|
75
|
-
|
76
|
-
infom message('Cherry pick continue successful')
|
77
|
-
end
|
78
|
-
|
79
|
-
def bash_editor
|
80
|
-
if source_commit.subject.present?
|
81
|
-
'true'
|
82
|
-
else
|
83
|
-
'bash -c "printf \\"Mensagem original em branco.\\n\\" > $1"'
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|