rake-stretcher 0.2.1 → 0.2.2
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
- data/lib/rake/stretcher/tasks/stretcher.rake +7 -11
- data/lib/rake/stretcher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edd76c646b947595620f2df2a3e8c6d0af6d4bb0
|
|
4
|
+
data.tar.gz: 896025ff0d24140e493bb1813226e6cf7b7fa035
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ca2cdbb1929088372db9334135825bd7b497c01fde062361c7410948e6be8fce0322f250165144f37fbe09ce370958de3ecfb794309d591b9d6481836f502a6
|
|
7
|
+
data.tar.gz: d981187da5731232a3c825c3be1fc629ba0d2fd12d22d3cdbc95ee39c0504d03ed0eca3376bb707c1c4c697b8a17f6a768de673e2dc196402bbb9e9f26fdb503
|
|
@@ -6,7 +6,7 @@ require 'open3'
|
|
|
6
6
|
namespace :stretcher do
|
|
7
7
|
|
|
8
8
|
def config
|
|
9
|
-
config ||= YAML.
|
|
9
|
+
config ||= YAML.load(ERB.new(IO.read('config/stretcher.yml')).result)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def local_working_path_base
|
|
@@ -38,7 +38,7 @@ namespace :stretcher do
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def branch
|
|
41
|
-
config['branch'] ||= 'master'
|
|
41
|
+
ENV['BRANCH'] || config['branch'] ||= 'master'
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def current_version
|
|
@@ -57,14 +57,6 @@ namespace :stretcher do
|
|
|
57
57
|
config['tarball_name']
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
def stretcher_path
|
|
61
|
-
config['stretcher_path']
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def stretcher_src
|
|
65
|
-
"#{stretcher_path}/#{tarball_name}-#{environment}.tgz"
|
|
66
|
-
end
|
|
67
|
-
|
|
68
60
|
def checksum
|
|
69
61
|
%x(openssl sha256 #{local_tarball_path}/current/#{tarball_name} | awk -F' ' '{print $2}').chomp
|
|
70
62
|
end
|
|
@@ -89,6 +81,10 @@ namespace :stretcher do
|
|
|
89
81
|
config['stretcher_hook']
|
|
90
82
|
end
|
|
91
83
|
|
|
84
|
+
def stretcher_src
|
|
85
|
+
config['stretcher_src']
|
|
86
|
+
end
|
|
87
|
+
|
|
92
88
|
def consul_host
|
|
93
89
|
config['consul_host']
|
|
94
90
|
end
|
|
@@ -149,7 +145,7 @@ namespace :stretcher do
|
|
|
149
145
|
desc "create and upload manifest"
|
|
150
146
|
task :create_and_upload_manifest do
|
|
151
147
|
template = File.read(File.expand_path('../../templates/manifest.yml.erb', __FILE__))
|
|
152
|
-
yaml = YAML.load(ERB.new(
|
|
148
|
+
yaml = YAML.load(ERB.new(IO.read("#{local_build_path}/config/#{stretcher_hook}")).result(binding))
|
|
153
149
|
deploy_roles.each do |role|
|
|
154
150
|
hooks = yaml[role]
|
|
155
151
|
yml = ERB.new(template).result(binding)
|