itamae-plugin-recipe-anyenv 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itamae/plugin/recipe/anyenv.rb +9 -3
- data/lib/itamae/plugin/recipe/anyenv/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: 9a329f4a78b20f85c3ccbaf4ffd12d34f84112d9
|
4
|
+
data.tar.gz: 5e1e50580cfe2291ad699fb75b81704b499cf476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee7601299191289b5b0605283b4c084c0e0d6f0f25a21d55dd2394125a82dda0eec20e6d181f0b460b86616c41e60a841a2af773844044322c61f57e80e4e479
|
7
|
+
data.tar.gz: 455fd133193a6be30de40e2f1505a7a5564bb4d6c06d024f808f8d54d4a61739275bee617fbe92d87d66c51342dab658568cf349c1589b2499dbd4cbb8c84129
|
@@ -6,6 +6,7 @@ def run(attributes, username = nil)
|
|
6
6
|
clone_anyenv
|
7
7
|
clone_anyenv_update
|
8
8
|
|
9
|
+
init_cmd
|
9
10
|
install_envs(attributes)
|
10
11
|
end
|
11
12
|
|
@@ -79,6 +80,7 @@ def install_envs(attributes)
|
|
79
80
|
envs.each do |env, vers|
|
80
81
|
install_env(env)
|
81
82
|
|
83
|
+
init_cmd
|
82
84
|
vers.each do |ver|
|
83
85
|
install_env_version(env, ver)
|
84
86
|
end
|
@@ -89,7 +91,6 @@ def install_envs(attributes)
|
|
89
91
|
end
|
90
92
|
|
91
93
|
def install_env(envname)
|
92
|
-
execute @init_cmd
|
93
94
|
execute "install #{envname}" do
|
94
95
|
user @username if @username
|
95
96
|
command "yes | anyenv install #{envname};"
|
@@ -98,7 +99,6 @@ def install_env(envname)
|
|
98
99
|
end
|
99
100
|
|
100
101
|
def install_env_version(envname, version)
|
101
|
-
execute @init_cmd
|
102
102
|
execute "#{envname} install #{version}" do
|
103
103
|
user @username if @username
|
104
104
|
command "yes | #{envname} install #{version}"
|
@@ -107,7 +107,6 @@ def install_env_version(envname, version)
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def global_version(envname, version)
|
110
|
-
execute @init_cmd
|
111
110
|
execute "#{envname} global #{version}" do
|
112
111
|
user @username if @username
|
113
112
|
command "#{envname} global #{version}; " \
|
@@ -115,3 +114,10 @@ def global_version(envname, version)
|
|
115
114
|
not_if "#{envname} global | grep #{version}"
|
116
115
|
end
|
117
116
|
end
|
117
|
+
|
118
|
+
def init_cmd
|
119
|
+
execute "anyenv init" do
|
120
|
+
user @username if @username
|
121
|
+
command @init_cmd
|
122
|
+
end
|
123
|
+
end
|