itamae-plugin-recipe-android_sdk 0.1.0 → 0.1.1
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/README.md +26 -3
- data/lib/itamae/plugin/recipe/android_sdk/latest.rb +12 -0
- data/lib/itamae/plugin/recipe/android_sdk/update_sdk.rb +11 -3
- data/lib/itamae/plugin/recipe/android_sdk/version.rb +1 -1
- data/lib/itamae/plugin/recipe/templates/android-update-sdk-latest.sh.erb +18 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2a8968ea9bd9e0e5540a656a0d514d7060a688a
|
4
|
+
data.tar.gz: 19e16c03aded9e4a14caab7083d96c740f5af442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ec36ed726d35f3e4b9e53a6e393fb69798813815e5dab2d4c1d3db4b8b6ffdb4aa44efa1c81d40db9b896c187114d47b313c605d7b796758849566db02a393a
|
7
|
+
data.tar.gz: 63d239b9fa313dd2964a0db48cbcae720b647e0dbdd7281cdf1025473710c64dd25ea19a1ba3a74b047073c797cac19113665ae674be8ebc1fcac05d8459dd48
|
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Require JDK.
|
4
4
|
|
5
|
-
|
5
|
+
[](https://badge.fury.io/rb/itamae-plugin-recipe-android_sdk)
|
6
6
|
|
7
|
-
|
7
|
+
## Installation
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
@@ -45,7 +45,7 @@ include_recipe 'android_sdk::install'
|
|
45
45
|
|
46
46
|
Default install path `/usr/local`, if not set 'install_path'
|
47
47
|
|
48
|
-
#### android sdk update
|
48
|
+
#### android sdk update with filter
|
49
49
|
|
50
50
|
Update Android SDK at like node.json following:
|
51
51
|
|
@@ -61,6 +61,29 @@ Update Android SDK at like node.json following:
|
|
61
61
|
}
|
62
62
|
```
|
63
63
|
|
64
|
+
e.g.
|
65
|
+
```
|
66
|
+
$ itamae ssh --vagrant --node-json node.json android_sdk.rb
|
67
|
+
```
|
68
|
+
|
69
|
+
#### android sdk update latest
|
70
|
+
|
71
|
+
Install Android SDK and update without filter.
|
72
|
+
|
73
|
+
* recipe
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
include_recipe 'android_sdk::latest'
|
77
|
+
```
|
78
|
+
|
79
|
+
It is the same with the following command:
|
80
|
+
|
81
|
+
```sh
|
82
|
+
$ android update sdk -u
|
83
|
+
```
|
84
|
+
|
85
|
+
※ Caution<br>
|
86
|
+
It takes long time :sob:
|
64
87
|
|
65
88
|
## License
|
66
89
|
|
@@ -4,6 +4,7 @@ ANDROID_SDK_ROOT = "#{node[:sdk][:install_path]}/#{node[:sdk][:directory]}"
|
|
4
4
|
|
5
5
|
# Interactive android sdk update shell.
|
6
6
|
TEMPLATE_SRC_PATH = "#{File.expand_path('../../', __FILE__)}/templates/android-update-sdk.sh.erb"
|
7
|
+
TEMPLATE_LATEST_SRC_PATH = "#{File.expand_path('../../', __FILE__)}/templates/android-update-sdk-latest.sh.erb"
|
7
8
|
TEMPLATE_DEST_PATH = "#{ANDROID_SDK_ROOT}/tools/android-update-sdk.sh"
|
8
9
|
|
9
10
|
case node[:platform]
|
@@ -13,13 +14,20 @@ else
|
|
13
14
|
package 'expect'
|
14
15
|
end
|
15
16
|
|
17
|
+
src_path = TEMPLATE_LATEST_SRC_PATH
|
18
|
+
update_list = ''
|
19
|
+
|
20
|
+
if node[:sdk][:update_list]
|
21
|
+
# Filter by user.
|
22
|
+
src_path = TEMPLATE_SRC_PATH
|
23
|
+
update_list = node[:sdk][:update_list].join(',')
|
24
|
+
end
|
25
|
+
|
16
26
|
template TEMPLATE_DEST_PATH do
|
17
27
|
mode "0755"
|
18
|
-
source
|
28
|
+
source src_path
|
19
29
|
end
|
20
30
|
|
21
|
-
update_list = node[:sdk][:update_list].join(',')
|
22
|
-
|
23
31
|
# Prepare.
|
24
32
|
case node[:platform]
|
25
33
|
when 'osx', 'darwin'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
expect -c "
|
4
|
+
set timeout -1
|
5
|
+
spawn <%= "#{node[:sdk][:install_path]}/#{node[:sdk][:directory]}" %>/tools/android update sdk -u
|
6
|
+
expect {
|
7
|
+
\"Do you accept the license\" {
|
8
|
+
send \"y\n\"
|
9
|
+
exp_continue
|
10
|
+
}
|
11
|
+
Downloading {
|
12
|
+
exp_continue
|
13
|
+
}
|
14
|
+
Installing {
|
15
|
+
exp_continue
|
16
|
+
}
|
17
|
+
}
|
18
|
+
"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-android_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- slowhand0309
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -83,8 +83,10 @@ files:
|
|
83
83
|
- lib/itamae/plugin/recipe/android_sdk.rb
|
84
84
|
- lib/itamae/plugin/recipe/android_sdk/dependency.rb
|
85
85
|
- lib/itamae/plugin/recipe/android_sdk/install.rb
|
86
|
+
- lib/itamae/plugin/recipe/android_sdk/latest.rb
|
86
87
|
- lib/itamae/plugin/recipe/android_sdk/update_sdk.rb
|
87
88
|
- lib/itamae/plugin/recipe/android_sdk/version.rb
|
89
|
+
- lib/itamae/plugin/recipe/templates/android-update-sdk-latest.sh.erb
|
88
90
|
- lib/itamae/plugin/recipe/templates/android-update-sdk.sh.erb
|
89
91
|
homepage: https://github.com/Slowhand0309/itamae-plugin-recipe-android_sdk
|
90
92
|
licenses:
|