vagrant-ebcommon 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-ebcommon/actions/setup_provision.rb +25 -16
- data/lib/vagrant-ebcommon/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: 6cc62c505d9129561ab7547bb1947674e17af3c0
|
4
|
+
data.tar.gz: 094ff634213b9f11b54e0fd48834cd5de4891dad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c6975602d103e33aaba1b7aef099aa2f6b3203d955373559334bc0db9dec1ded55c67943380a4aba992b27f0f3fea83ea1e65f356a3b90f4b7f75d1f942305e
|
7
|
+
data.tar.gz: a77ddd637939a778f6d004d0f66180d9caaab7cf32bf9cd197ba1f2d4d98d82c5980ad753dc9f531a2da577af8e3981003e06102429889bd68b085e6439e987b
|
@@ -46,22 +46,31 @@ module VagrantPlugins
|
|
46
46
|
|
47
47
|
# Copy over our git commit hooks
|
48
48
|
def setup_git_hooks
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
49
|
+
# repos to be hook'ed
|
50
|
+
return unless @ebcommon.git_hook_repos
|
51
|
+
|
52
|
+
# source
|
53
|
+
plugin_hooks_dir = File.expand_path File.join(File.dirname(__FILE__), '..', 'files', 'git_hooks')
|
54
|
+
git_hooks = Dir.entries(plugin_hooks_dir).select {|f| !File.directory? f}
|
55
|
+
|
56
|
+
@env[:ui].info 'Copying over git commit hooks...'
|
57
|
+
@ebcommon.git_hook_repos.each do |repo_path|
|
58
|
+
# repo
|
59
|
+
repo_dir = File.join @ebcommon.git_hook_root_dir, repo_path, '.git'
|
60
|
+
next unless File.directory? repo_dir
|
61
|
+
|
62
|
+
# create repo hooks dir if needed
|
63
|
+
target_hooks_dir = File.join repo_dir, 'hooks'
|
64
|
+
unless File.directory? target_hooks_dir
|
65
|
+
@env[:ui].info "Creating #{target_hooks_dir} directory..."
|
66
|
+
FileUtils.mkdir target_hooks_dir
|
67
|
+
end
|
68
|
+
|
69
|
+
# copy source hooks to repo
|
70
|
+
git_hooks.each do |hook|
|
71
|
+
@env[:ui].success "Copying over git hook: #{hook} to #{target_hooks_dir}"
|
72
|
+
source = File.join plugin_hooks_dir, hook
|
73
|
+
FileUtils.cp source, target_hooks_dir
|
65
74
|
end
|
66
75
|
end
|
67
76
|
end
|