itamae-plugin-recipe-anyenv 0.3.34 → 0.3.35
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/itamae/plugin/recipe/anyenv.rb +49 -26
- 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: 445c54d528ed99f45af2510810255ef020bc5172
|
4
|
+
data.tar.gz: 60e008b0c1917d3e3b23ffb87d60b7bd2639022d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bc0bfa08b20f764b66921b86f7d41ef20ceb4c183886765119ed270f99d8e60a613b6becadf7b48c275cf880abc5f9d193d8608d9ea9d52af86d65657cb1b57
|
7
|
+
data.tar.gz: 545b1cc518fc17234f3e069e5089f44804579b2620afae66a2be7f3d67c7d5c35d4c34959412061290f4c13283f0a8ad028b5376ba0a6b2c6ea28e0285632b89
|
@@ -22,9 +22,21 @@ def scheme
|
|
22
22
|
@scheme ||= node[:anyenv][:scheme] || 'git'
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
def install_envs(attributes)
|
26
|
+
attributes[:install_versions].each do |envs|
|
27
|
+
envs.each do |env, vers|
|
28
|
+
install('anyenv', env)
|
29
|
+
|
30
|
+
vers.each { |ver| install(env, ver) }
|
31
|
+
|
32
|
+
global_version(env, vers.first)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def install(from, to)
|
38
|
+
execute anyenv_init_with("yes | #{from} install #{to};")
|
39
|
+
end
|
28
40
|
|
29
41
|
def init(username)
|
30
42
|
@username = username
|
@@ -91,33 +103,36 @@ def clone_anyenv_update
|
|
91
103
|
clone_repository(install_path, repo_path)
|
92
104
|
end
|
93
105
|
|
94
|
-
def install_envs(attributes)
|
95
|
-
|
96
|
-
|
97
|
-
|
106
|
+
# def install_envs(attributes)
|
107
|
+
# attributes[:install_versions].each do |envs|
|
108
|
+
# envs.each do |env, vers|
|
109
|
+
# install_env(env)
|
98
110
|
|
99
|
-
|
111
|
+
# vers.each do |ver|
|
112
|
+
# install_env_version(env, ver)
|
113
|
+
# end
|
100
114
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
end
|
115
|
+
# global_version(env, vers.first)
|
116
|
+
# end
|
117
|
+
# end
|
118
|
+
# end
|
105
119
|
|
106
|
-
def install_env(envname)
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
end
|
120
|
+
# def install_env(envname)
|
121
|
+
# execute "install #{envname}" do
|
122
|
+
# user @username if @username
|
123
|
+
# command @init_cmd
|
124
|
+
# command "#{@init_cmd} yes | anyenv install #{envname};"
|
125
|
+
# not_if "type #{envname}"
|
126
|
+
# end
|
127
|
+
# end
|
113
128
|
|
114
|
-
def install_env_version(envname, version)
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
end
|
129
|
+
# def install_env_version(envname, version)
|
130
|
+
# execute "#{envname} install #{version}" do
|
131
|
+
# user @username if @username
|
132
|
+
# command "#{@init_cmd} yes | #{envname} install #{version}"
|
133
|
+
# not_if "#{@init_cmd} #{envname} versions | grep #{version}"
|
134
|
+
# end
|
135
|
+
# end
|
121
136
|
|
122
137
|
def global_version(envname, version)
|
123
138
|
execute "#{envname} global #{version}" do
|
@@ -128,4 +143,12 @@ def global_version(envname, version)
|
|
128
143
|
EOS
|
129
144
|
not_if anyenv_init_with "#{envname} global | grep #{version}"
|
130
145
|
end
|
146
|
+
# execute "#{envname} global #{version}" do
|
147
|
+
# user @username if @username
|
148
|
+
# command <<-EOS
|
149
|
+
# #{envname} global #{version};
|
150
|
+
# #{envname} rehash;
|
151
|
+
# EOS
|
152
|
+
# not_if "#{envname} global | grep #{version}"
|
153
|
+
# end
|
131
154
|
end
|