deploy-context 2.1.26.1.gb2b5290 → 2.1.27.1.gd07a6e7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/deploy-context/deploy/cucumber.rb +1 -2
- data/lib/deploy-context/deploy/git.rb +12 -10
- data/lib/deploy-context/deploy/ruby.rb +3 -5
- data/lib/deploy-context/deploy.rb +9 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36244a54bb1d05997c9d2955b5651b9aeb60d7f0cfe01cb1c6478a1e2ffd1804
|
4
|
+
data.tar.gz: 623acfa3e111e59ab2a6979f5df8a2a0e7646fb9b5653dc6cbb6a88803055148
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0878bbcb75424912d15a8c0da09ece0e7a2443ba7e93419a4b34e82d8d3aa80ef9f0a16529af4da7eaa392412f82d565501389e4d427b916632a56b5895e99ee'
|
7
|
+
data.tar.gz: 829ec345af8e4135bb9490a586a66c69b6703ea41d812532c8d5369d130e32ab6eeadcf747d02c942516dd0c0d1e5869b5d8f3b253e65cadc0edb05043733896
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -2,8 +2,7 @@ module Context
|
|
2
2
|
module CucumberDeployerHelper
|
3
3
|
def cucumber_test(context)
|
4
4
|
git_build(context)
|
5
|
-
Dir.
|
6
|
-
puts "Working in folder #{Dir.pwd}\nAnd context #{context.context_name} is created"
|
5
|
+
puts "Working in folder #{Dir.pwd}\nAnd context #{context.context_name} is created in folder #{context.context_folder} at version #{context.version}"
|
7
6
|
cucumber
|
8
7
|
end
|
9
8
|
end
|
@@ -1,39 +1,41 @@
|
|
1
1
|
module Context
|
2
2
|
module GitDeployerHelper
|
3
3
|
def git_build(context)
|
4
|
-
|
5
|
-
|
6
|
-
if ::Dir.exist?(context.context_folder)
|
4
|
+
if context.present_localy?
|
5
|
+
Dir.chdir(context.context_folder)
|
7
6
|
git_pull(context)
|
8
7
|
else
|
9
|
-
|
8
|
+
local_dir = File.join(Dir.pwd, context.context_name)
|
9
|
+
git ["clone git@github.com:JimboDragonGit/#{context.context_name}.git"] unless ::Dir.exist?(local_dir)
|
10
|
+
context.move_folder(local_dir)
|
10
11
|
end
|
11
12
|
end
|
12
13
|
|
13
14
|
def git_pull(context)
|
14
|
-
|
15
|
+
git_build(context) unless context.actual_working_directory?
|
15
16
|
git ['pull']
|
16
17
|
end
|
17
18
|
|
18
19
|
def git_commit(context)
|
19
|
-
|
20
|
+
git_build(context)
|
20
21
|
git ['add .']
|
21
22
|
git ["commit -m 'Create #{context.context_name} automatic commit'"]
|
22
23
|
end
|
23
24
|
|
24
25
|
def git_release(context)
|
25
|
-
|
26
|
+
git_build(context)
|
26
27
|
git ['push', '--follow-tags']
|
27
28
|
end
|
28
29
|
|
29
30
|
def git_bump(context, level)
|
30
|
-
|
31
|
+
git_build(context)
|
31
32
|
git ['version-bump', level]
|
33
|
+
git_commit(context)
|
32
34
|
end
|
33
35
|
|
34
36
|
def patch_reset(context)
|
37
|
+
git_build(context)
|
35
38
|
git_bump(context, 'minor')
|
36
|
-
git_commit(context)
|
37
39
|
end
|
38
40
|
|
39
41
|
def git_update_available?(context)
|
@@ -43,7 +45,7 @@ module Context
|
|
43
45
|
end
|
44
46
|
|
45
47
|
def git_dirty_state?(context)
|
46
|
-
|
48
|
+
git_build(context)
|
47
49
|
# git ['log', "v#{context.version}"]
|
48
50
|
`git status --porcelain`.split('\n').count > 0
|
49
51
|
end
|
@@ -4,13 +4,12 @@ module Context
|
|
4
4
|
module RubyDeployerHelper
|
5
5
|
def ruby_build(context)
|
6
6
|
git_build(context)
|
7
|
-
Dir.chdir context.context_folder
|
8
7
|
puts "Working in folder #{Dir.pwd}\nAnd context #{context.context_name} is created"
|
9
8
|
check_folder get_context_folder(context, 'build')
|
10
9
|
end
|
11
10
|
|
12
11
|
def ruby_release(context)
|
13
|
-
|
12
|
+
git_build(context)
|
14
13
|
# gem ["push #{context.context_name}-#{GVB.version}.gem"]
|
15
14
|
# context.patch_bump if gem_installed?(context)
|
16
15
|
rake ['release']
|
@@ -18,7 +17,6 @@ module Context
|
|
18
17
|
end
|
19
18
|
|
20
19
|
def ruby_install(context)
|
21
|
-
Dir.chdir context.context_folder
|
22
20
|
gem ['install', context.context_name]
|
23
21
|
end
|
24
22
|
|
@@ -37,14 +35,14 @@ module Context
|
|
37
35
|
end
|
38
36
|
|
39
37
|
def ruby_check_if_available_public(context)
|
40
|
-
puts "Waiting a minute before installing"
|
38
|
+
puts "Waiting a minute before installing #{context.context_name} in folder #{context.context_folder}"
|
41
39
|
`chef gem list #{context.context_name}`
|
42
40
|
# sleep(60)
|
43
41
|
end
|
44
42
|
|
45
43
|
def gem_installed?(context)
|
46
44
|
installed_version = Gem::Specification.find_by_name(context.context_name).version
|
47
|
-
puts "Compare #{context.context_name} installed_version #{installed_version} with #{context.version}"
|
45
|
+
puts "Compare #{context.context_name} installed_version #{installed_version} with #{context.version} in folder #{context.context_folder}"
|
48
46
|
installed = installed_version == context.version
|
49
47
|
puts "installed = #{installed}"
|
50
48
|
installed
|
@@ -9,13 +9,21 @@ module Context
|
|
9
9
|
|
10
10
|
def initialize(context_name, deploycontext_folder)
|
11
11
|
@context_name = context_name
|
12
|
-
@context_folder =
|
12
|
+
@context_folder = move_folder(deploycontext_folder)
|
13
13
|
end
|
14
14
|
|
15
15
|
def present_localy?
|
16
16
|
Dir.exist?(context_folder)
|
17
17
|
end
|
18
18
|
|
19
|
+
def actual_working_directory?
|
20
|
+
Dir.pwd == context_folder
|
21
|
+
end
|
22
|
+
|
23
|
+
def move_folder(folder)
|
24
|
+
@context_folder = folder.include?(context_name) ? folder : File.join(folder, context_name)
|
25
|
+
end
|
26
|
+
|
19
27
|
def check_folder(folder)
|
20
28
|
FileUtils.mkdir_p(context_folder) unless present_localy?
|
21
29
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|