librarian-puppet-simple 0.0.4 → 0.0.5
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/librarian/puppet/simple/cli.rb +14 -10
- data/lib/librarian/puppet/simple/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: 09800d8e71a73911ccabd72a8379f7a2cbac65b2
|
|
4
|
+
data.tar.gz: 524f5ac5d7ab555a0cfe646f353d3513be8714a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc7acd69bcd90b75c3bf4d3a82a76790a931ee54c6fa4bbaeb928ec3a2bc65b6bee9c39a715be46238a266917ae81d39121533c12837f1a452fcf5058967613f
|
|
7
|
+
data.tar.gz: a49a961ed7337fbe99ac796b05349758af92da5eda2bbedab2009f6748b217e9613a0172a65ac6547bc7e04be0c0d80e50831fc69d3e1b34dea52afe63313112
|
|
@@ -43,17 +43,21 @@ module Librarian
|
|
|
43
43
|
@custom_module_path = options[:path]
|
|
44
44
|
eval(File.read(File.expand_path(options[:puppetfile])))
|
|
45
45
|
each_module_of_type(:git) do |repo|
|
|
46
|
-
Dir.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
branch
|
|
46
|
+
if Dir.exists?(File.join(module_path, repo[:name]))
|
|
47
|
+
Dir.chdir(File.join(module_path, repo[:name])) do
|
|
48
|
+
remote = repo[:git]
|
|
49
|
+
# if no ref is given, assume master
|
|
50
|
+
branch = repo[:ref] || 'master'
|
|
51
|
+
if branch =~ /^origin\/(.*)$/
|
|
52
|
+
branch = $1
|
|
53
|
+
end
|
|
54
|
+
co_cmd = 'git checkout FETCH_HEAD'
|
|
55
|
+
update_cmd = "git fetch #{repo[:git]} #{branch} && #{co_cmd}"
|
|
56
|
+
print_verbose "\n\n#{repo[:name]} -- #{update_cmd}"
|
|
57
|
+
git_pull_cmd = system_cmd(update_cmd)
|
|
52
58
|
end
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
print_verbose "\n\n#{repo[:name]} -- #{update_cmd}"
|
|
56
|
-
git_pull_cmd = system_cmd(update_cmd)
|
|
59
|
+
else
|
|
60
|
+
install_git module_path, repo[:name], repo[:git], repo[:ref]
|
|
57
61
|
end
|
|
58
62
|
end
|
|
59
63
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: librarian-puppet-simple
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Bode
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|