itamae-plugin-recipe-anyenv 0.3.25 → 0.3.26
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/version.rb +1 -1
- data/lib/itamae/plugin/recipe/anyenv.rb +16 -17
- 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: 9ce4ed3a781c694d8dbe46d0a01be2fc3abd6082
|
4
|
+
data.tar.gz: 4f487490e92c6087ad273a24479af0e91349fae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3f908fb2c23e7f7ff7c0cf5d829b1d7d0059f559baa846a3173d3315629a5714dcfe5697a069bea778444c8879d48b73a779e5412cf8289bbe9bf99fc3d8569
|
7
|
+
data.tar.gz: 62936362a9abcc20a36078396d9b67a98abaccc6be9e0798a08bb0e221ce449628ee66ededbdd60f95234fb892de182b45b70eafd5f53c39215067ac76d7cf7b
|
@@ -1,24 +1,22 @@
|
|
1
1
|
DEFAULT_ANYENV_ROOT = '/usr/local/anyenv'.freeze
|
2
2
|
|
3
3
|
def run(attributes, username = ENV['USER'])
|
4
|
-
|
4
|
+
init(username)
|
5
5
|
|
6
6
|
p :USR
|
7
7
|
p ENV['USER']
|
8
8
|
p :ANYENV_ROOT
|
9
9
|
p ENV['ANYENV_ROOT']
|
10
10
|
|
11
|
-
root_path
|
11
|
+
clone_anyenv(@root_path)
|
12
|
+
clone_anyenv_update(@root_path)
|
12
13
|
|
13
|
-
|
14
|
-
clone_anyenv_update(root_path)
|
14
|
+
directory "#{@root_path}/envs"
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
install('anyenv', '
|
19
|
-
install('
|
20
|
-
install('anyenv', 'exenv', root_path)
|
21
|
-
install('exenv', '1.3.2', root_path)
|
16
|
+
install('anyenv', 'rbenv')
|
17
|
+
install('rbenv', '2.3.1')
|
18
|
+
install('anyenv', 'exenv')
|
19
|
+
install('exenv', '1.3.2')
|
22
20
|
|
23
21
|
|
24
22
|
|
@@ -31,19 +29,20 @@ def scheme
|
|
31
29
|
@scheme ||= node[:anyenv][:scheme] || 'git'
|
32
30
|
end
|
33
31
|
|
34
|
-
def install(from, to
|
32
|
+
def install(from, to)
|
35
33
|
execute <<-"EOS".gsub("\n", ' ')
|
36
|
-
export ANYENV_ROOT=#{root_path};
|
34
|
+
export ANYENV_ROOT=#{@root_path};
|
37
35
|
export PATH=#{root_path}/bin:${PATH};
|
38
36
|
eval "$(anyenv init -)";
|
39
37
|
yes | #{from} install #{to};
|
40
38
|
EOS
|
41
39
|
end
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
#
|
40
|
+
|
41
|
+
def init(username)
|
42
|
+
@username = username
|
43
|
+
@root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
|
44
|
+
# @init_cmd = anyenv_init(@anyenv_root_path)
|
45
|
+
end
|
47
46
|
|
48
47
|
|
49
48
|
# def anyenv_root(username)
|