clc-promote 0.4.0.dev.12 → 0.4.0.dev.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promote/rake_tasks.rb +2 -2
- data/lib/promote/utils.rb +4 -4
- data/lib/promote/versioner.rb +4 -4
- 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: d535a11af603a2375533a83c09e023059a6a9743
|
4
|
+
data.tar.gz: 3e429dfb0d05a97d6404b801850488db420d3af7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e0d48616601ca4ed7c275f6c551955a65c9bb1c8b12815e33836826c5bf7b37ae656ee012c21d36f96656828bbf8e3232a4cc808fefa111f74733e57be8735a
|
7
|
+
data.tar.gz: bcb55d7ad66d311a26e1a523f2ebf8fbe8ab44ef3226720ce6d2dad6dbb88ddc502294d25af8ef98005f10827943097dbdf6f6c9712627c8f96afba78c209364
|
data/lib/promote/rake_tasks.rb
CHANGED
@@ -52,9 +52,9 @@ module Promote
|
|
52
52
|
def define_sync_berksfile
|
53
53
|
namespace "Promote" do
|
54
54
|
desc "Syncs a Berksfile.lock file"
|
55
|
-
task "sync_berksfile", :cookbook do |task, args|
|
55
|
+
task "sync_berksfile", :cookbook, :update do |task, args|
|
56
56
|
puts "Syncing berksfile.lock for #{args.cookbook}..."
|
57
|
-
@versioner.sync_berksfile(args.cookbook)
|
57
|
+
@versioner.sync_berksfile(args.cookbook, args.update)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
data/lib/promote/utils.rb
CHANGED
@@ -7,19 +7,19 @@ module Promote
|
|
7
7
|
rest.get_rest("/cookbooks?num_versions=all")
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.sync_berksfiles(cookbook_directory)
|
10
|
+
def self.sync_berksfiles(cookbook_directory, update)
|
11
11
|
repo_cookbooks = Dir.glob(File.join(cookbook_directory, "*"))
|
12
12
|
repo_cookbooks.each do |cookbook|
|
13
|
-
sync_berksfile(cookbook)
|
13
|
+
sync_berksfile(cookbook, update)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def self.sync_berksfile(cookbook_root)
|
17
|
+
def self.sync_berksfile(cookbook_root, update)
|
18
18
|
berks_name = File.join(cookbook_root, "Berksfile")
|
19
19
|
if File.exist?(berks_name)
|
20
20
|
Berkshelf.set_format :null
|
21
21
|
berksfile = Berkshelf::Berksfile.from_file(berks_name)
|
22
|
-
berksfile.install
|
22
|
+
update ? berksfile.update : berksfile.install
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/lib/promote/versioner.rb
CHANGED
@@ -45,12 +45,12 @@ module Promote
|
|
45
45
|
results
|
46
46
|
end
|
47
47
|
|
48
|
-
def sync_berksfile(cookbook_name)
|
49
|
-
Utils.sync_berksfile(File.join(config.cookbook_directory, cookbook_name))
|
48
|
+
def sync_berksfile(cookbook_name, update = false)
|
49
|
+
Utils.sync_berksfile(File.join(config.cookbook_directory, cookbook_name), update)
|
50
50
|
end
|
51
51
|
|
52
|
-
def sync_berksfiles
|
53
|
-
Utils.sync_berksfiles(config.cookbook_directory)
|
52
|
+
def sync_berksfiles(update = false)
|
53
|
+
Utils.sync_berksfiles(config.cookbook_directory, update)
|
54
54
|
end
|
55
55
|
|
56
56
|
def version_environment(environment_name)
|