depengine 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/depengine/dsl/deployment.rb +8 -0
- data/lib/depengine/publisher/git.rb +23 -3
- data/lib/depengine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d2bb5cf2054dc0b303319621a307d6331d3a115
|
4
|
+
data.tar.gz: b80cad92af202b0575bd13873ecfb73380155587
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc6d73ec1e9cfa59602b18709097c44bd8f1fb7e8d691601548c18b9c9ed58a881f30e295247d5e9a84d0bfcdce24fc026c32f2032de475ebbc11070684ce57a
|
7
|
+
data.tar.gz: 5fa9fde1a0aa3d78a511117a0fb94b8be91338caec8794b1372a2dd3ef8c99bb01da720f58fa046cbbd22c536e4daeef88255d2e97394ad09003e27ca1473610
|
@@ -686,6 +686,14 @@ module Deployment
|
|
686
686
|
publisher.checkout(branch_name, options)
|
687
687
|
end
|
688
688
|
|
689
|
+
def git_submodule(options={})
|
690
|
+
publisher = Publisher::Git.new
|
691
|
+
publisher.repository_url = options[:git_repository_url] || @cdb['git_repository_url']
|
692
|
+
publisher.repository_local_dir = options[:git_repository_local] || @cdb['git_repository_local']
|
693
|
+
publisher.submodule_option = options[:git_submodule_option] || @cdb['git_submodule_option'] || "--recusive"
|
694
|
+
publisher.submodule(submodule_option, options)
|
695
|
+
end
|
696
|
+
|
689
697
|
def git_tag(tag_name, options={})
|
690
698
|
publisher = Publisher::Git.new
|
691
699
|
publisher.repository_url = options[:git_repository_url] || @cdb['git_repository_url']
|
@@ -40,6 +40,14 @@ module Publisher
|
|
40
40
|
Helper.validates_presence_of repository_local_dir, "repository_local_dir not set"
|
41
41
|
|
42
42
|
Dir.chdir(repository_local_dir) do
|
43
|
+
# Pull
|
44
|
+
shell_cmd = "git pull origin"
|
45
|
+
output = system shell_cmd
|
46
|
+
if not output
|
47
|
+
$log.writer.error "Unable to pull branch #{branch_name}"
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
|
43
51
|
# Checkout
|
44
52
|
shell_cmd = "git checkout -f #{branch_name}"
|
45
53
|
output = system shell_cmd
|
@@ -47,17 +55,29 @@ module Publisher
|
|
47
55
|
$log.writer.error "Unable to checkout branch #{branch_name}"
|
48
56
|
exit 1
|
49
57
|
end
|
58
|
+
end
|
59
|
+
end
|
50
60
|
|
51
|
-
|
52
|
-
|
61
|
+
def submodule(submodule_option, options={})
|
62
|
+
Helper.validates_presence_of repository_url, "repository_url not set"
|
63
|
+
Helper.validates_presence_of repository_local_dir, "repository_local_dir not set"
|
64
|
+
|
65
|
+
Dir.chdir(repository_local_dir) do
|
66
|
+
# Submodule init
|
67
|
+
shell_cmd = "git submodule init"
|
68
|
+
output = system shell_cmd
|
69
|
+
|
70
|
+
# git submodule update --recursive
|
71
|
+
shell_cmd = "git submodule update #{submodule_option}"
|
53
72
|
output = system shell_cmd
|
54
73
|
if not output
|
55
|
-
$log.writer.error "Unable to pull
|
74
|
+
$log.writer.error "Unable to pull submodule"
|
56
75
|
exit 1
|
57
76
|
end
|
58
77
|
end
|
59
78
|
end
|
60
79
|
|
80
|
+
|
61
81
|
def tag(tag_name, options={})
|
62
82
|
Helper.validates_presence_of repository_url, "repository_url not set"
|
63
83
|
Helper.validates_presence_of repository_local_dir, "repository_local_dir not set"
|
data/lib/depengine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: depengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Automatisierung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|