bento-ya 0.0.2 → 0.0.3
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/CHANGELOG.md +7 -1
- data/README.md +26 -0
- data/lib/bento/common.rb +1 -39
- data/lib/bento/packerexec.rb +13 -12
- data/lib/bento/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff260877c5af06c3daa869b21c3822c10c9744cc
|
4
|
+
data.tar.gz: efa5a7453aefd3b1a45125c86ca14a8331164cbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 666669fe822e85edf1d0c3254f1b5b9cb8cf983df7b8a591e41b16709772c121951637dcd95a80648a77cac9f8c2812eb0291d7dd606dc289dc707aaeab6a2e4
|
7
|
+
data.tar.gz: 2524156427b8f2312c3e23844d8fae40e94cd3b3e207367b9553c9876772ea4c5ec3a9423e4d69597a56c07b0a86d1a6f23c30f2663aed8f5cc18ccc8cfdf193
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v0.0.3](https://github.com/cheeseplus/bento-ya/tree/v0.0.3) (2017-02-22)
|
4
|
+
[Full Changelog](https://github.com/cheeseplus/bento-ya/compare/v0.0.2...v0.0.3)
|
5
|
+
|
6
|
+
**Improvements:**
|
7
|
+
|
8
|
+
- Cleaning up code and fixing normalize [\#8](https://github.com/cheeseplus/bento-ya/pull/8) ([cheeseplus](https://github.com/cheeseplus))
|
9
|
+
|
3
10
|
## [v0.0.2](https://github.com/cheeseplus/bento-ya/tree/v0.0.2) (2017-02-18)
|
4
11
|
[Full Changelog](https://github.com/cheeseplus/bento-ya/compare/v0.0.1...v0.0.2)
|
5
12
|
|
@@ -8,7 +15,6 @@
|
|
8
15
|
- Deal with executables missing [\#5](https://github.com/cheeseplus/bento-ya/pull/5) ([karcaw](https://github.com/karcaw))
|
9
16
|
|
10
17
|
## [v0.0.1](https://github.com/cheeseplus/bento-ya/tree/v0.0.1) (2016-12-19)
|
11
|
-
**Merged pull requests:**
|
12
18
|
|
13
19
|
- Initial release
|
14
20
|
|
data/README.md
CHANGED
@@ -21,6 +21,8 @@ sure to run `bundle install`.
|
|
21
21
|
|
22
22
|
### Using `bento`
|
23
23
|
|
24
|
+
#### build
|
25
|
+
|
24
26
|
To build multiple templates for all providers (VirtualBox, Fusion, Parallels, etc):
|
25
27
|
|
26
28
|
$ bento build debian-8.6-amd64 debian-8.6-i386
|
@@ -29,6 +31,28 @@ To build a box for a single provider:
|
|
29
31
|
|
30
32
|
$ bento build --only=virtualbox-iso debian-8.6-amd64
|
31
33
|
|
34
|
+
|
35
|
+
*NOTE*: The following commands rely on the environmental variables
|
36
|
+
`ATLAS_TOKEN` and `ATLAS_ORG` being correctly set.
|
37
|
+
|
38
|
+
#### upload
|
39
|
+
|
40
|
+
To upload built boxes to [Atlas][atlas].
|
41
|
+
|
42
|
+
$ bento upload
|
43
|
+
|
44
|
+
#### release
|
45
|
+
|
46
|
+
$ bento release debian-8.6 2.3.3
|
47
|
+
|
48
|
+
#### revoke
|
49
|
+
|
50
|
+
$ bento revoke debian-8.6 2.3.3
|
51
|
+
|
52
|
+
#### delete
|
53
|
+
|
54
|
+
$ bento revoke debian-8.6 2.3.3
|
55
|
+
|
32
56
|
## Versioning
|
33
57
|
|
34
58
|
bento-ya aims to adhere to [Semantic Versioning 2.0.0][semver].
|
@@ -38,3 +62,5 @@ bento-ya aims to adhere to [Semantic Versioning 2.0.0][semver].
|
|
38
62
|
Apache License, Version 2.0 (see [LICENSE][license])
|
39
63
|
|
40
64
|
[license]: https://github.com/cheeseplus/bento-ya/blob/master/LICENSE
|
65
|
+
[semver]: http://semver.org/
|
66
|
+
[atlas]: https://atlas.hashicorp.com
|
data/lib/bento/common.rb
CHANGED
@@ -107,19 +107,12 @@ module Common
|
|
107
107
|
case tool
|
108
108
|
when /parallels/
|
109
109
|
ver = cmd.stdout.split(' ')[2]
|
110
|
-
# hash = cmd.stdout.split(' ')[3]
|
111
|
-
# ver = "#{semver} #{hash}"
|
112
110
|
when /fusion/
|
113
111
|
ver = cmd.stderr.split(' ')[5]
|
114
|
-
# hash = cmd.stderr.split(' ')[6].gsub(/^build-/,'')
|
115
|
-
# ver = "#{semver} \(#{hash}\)"
|
116
112
|
when /vagrant/
|
117
|
-
|
118
|
-
ver = "#{semver}"
|
113
|
+
ver = cmd.stdout.split(' ')[1]
|
119
114
|
when /virtualbox/
|
120
115
|
ver = cmd.stdout.split('r')[0]
|
121
|
-
# hash = cmd.stdout.split('r')[1].gsub(/\n/,'')
|
122
|
-
# ver = "#{semver} \(#{hash}\)"
|
123
116
|
else
|
124
117
|
ver = cmd.stdout.split("\n")[0]
|
125
118
|
end
|
@@ -131,34 +124,3 @@ module Common
|
|
131
124
|
tool_versions
|
132
125
|
end
|
133
126
|
end
|
134
|
-
|
135
|
-
# module PackerExec
|
136
|
-
|
137
|
-
# def for_packer_run_with(template)
|
138
|
-
# Tempfile.open("#{template}-metadata.json") do |md_file|
|
139
|
-
# Tempfile.open("#{template}-metadata-var-file") do |var_file|
|
140
|
-
# write_box_metadata(template, md_file)
|
141
|
-
# yield md_file, var_file
|
142
|
-
# end
|
143
|
-
# end
|
144
|
-
# end
|
145
|
-
|
146
|
-
# def write_box_metadata(template, io)
|
147
|
-
# md = BuildMetadata.new(template, build_timestamp, override_version).read
|
148
|
-
# io.write(JSON.pretty_generate(md))
|
149
|
-
# io.close
|
150
|
-
# end
|
151
|
-
|
152
|
-
# # def write_var_file(template, md_file, io)
|
153
|
-
# # md = BuildMetadata.new(template, build_timestamp, override_version).read
|
154
|
-
|
155
|
-
# # io.write(JSON.pretty_generate({
|
156
|
-
# # box_basename: md[:box_basename],
|
157
|
-
# # build_timestamp: md[:build_timestamp],
|
158
|
-
# # git_revision: md[:git_revision],
|
159
|
-
# # metadata: md_file.path,
|
160
|
-
# # version: md[:version],
|
161
|
-
# # }))
|
162
|
-
# # io.close
|
163
|
-
# # end
|
164
|
-
# end
|
data/lib/bento/packerexec.rb
CHANGED
@@ -5,6 +5,7 @@ module PackerExec
|
|
5
5
|
Tempfile.open("#{template}-metadata.json") do |md_file|
|
6
6
|
Tempfile.open("#{template}-metadata-var-file") do |var_file|
|
7
7
|
write_box_metadata(template, md_file)
|
8
|
+
write_var_file(template, md_file, var_file)
|
8
9
|
yield md_file, var_file
|
9
10
|
end
|
10
11
|
end
|
@@ -16,16 +17,16 @@ module PackerExec
|
|
16
17
|
io.close
|
17
18
|
end
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
def write_var_file(template, md_file, io)
|
21
|
+
md = BuildMetadata.new(template, build_timestamp, override_version).read
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
23
|
+
io.write(JSON.pretty_generate({
|
24
|
+
box_basename: md[:box_basename],
|
25
|
+
build_timestamp: md[:build_timestamp],
|
26
|
+
git_revision: md[:git_revision],
|
27
|
+
metadata: md_file.path,
|
28
|
+
version: md[:version],
|
29
|
+
}))
|
30
|
+
io.close
|
31
|
+
end
|
32
|
+
end
|
data/lib/bento/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bento-ya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Thomas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|