builderator 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +24 -29
- data/README.md +2 -0
- data/VERSION +1 -1
- data/docs/versioning.md +2 -2
- data/lib/builderator/control/version/scm.rb +4 -0
- data/lib/builderator/control/version.rb +10 -0
- data/lib/builderator/tasks/berkshelf.rb +4 -0
- data/rvm.env +4 -4
- data/spec/version_spec.rb +40 -0
- 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: ec9b3b99b02e2e735e33bbc78da82f65a502f579
|
4
|
+
data.tar.gz: 9ec84828b5d15e715f93844328610adf09bcae7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dc75e1de4d13342c15fb5f88bdfa11035aa38f884b4bf2ba94ac719a6f15139d808d6ea849896d840cc536010745c6c1d43dfef90f715f4443939932dc5f65c
|
7
|
+
data.tar.gz: e55a662292f305a923d1191e20ed7d2a80d91dc55d43858c9c6bb3488ef63f845ca6545745c07d5991e72742f83e6aeec51b95138d2e4ff54bdf64f4a99c8b39
|
data/Gemfile.lock
CHANGED
@@ -14,13 +14,13 @@ GEM
|
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
16
|
addressable (2.4.0)
|
17
|
-
ast (2.
|
18
|
-
aws-sdk (2.3.
|
19
|
-
aws-sdk-resources (= 2.3.
|
20
|
-
aws-sdk-core (2.3.
|
17
|
+
ast (2.3.0)
|
18
|
+
aws-sdk (2.3.11)
|
19
|
+
aws-sdk-resources (= 2.3.11)
|
20
|
+
aws-sdk-core (2.3.11)
|
21
21
|
jmespath (~> 1.0)
|
22
|
-
aws-sdk-resources (2.3.
|
23
|
-
aws-sdk-core (= 2.3.
|
22
|
+
aws-sdk-resources (2.3.11)
|
23
|
+
aws-sdk-core (= 2.3.11)
|
24
24
|
berkshelf (4.3.3)
|
25
25
|
addressable (~> 2.3, >= 2.3.4)
|
26
26
|
berkshelf-api-client (~> 2.0, >= 2.0.2)
|
@@ -56,30 +56,31 @@ GEM
|
|
56
56
|
celluloid-io (0.16.2)
|
57
57
|
celluloid (>= 0.16.0)
|
58
58
|
nio4r (>= 1.1.0)
|
59
|
-
chef (12.
|
60
|
-
chef-config (= 12.
|
61
|
-
chef-zero (~> 4.
|
59
|
+
chef (12.7.2)
|
60
|
+
chef-config (= 12.7.2)
|
61
|
+
chef-zero (~> 4.5)
|
62
62
|
diff-lcs (~> 1.2, >= 1.2.4)
|
63
63
|
erubis (~> 2.7)
|
64
64
|
ffi-yajl (~> 2.2)
|
65
65
|
highline (~> 1.6, >= 1.6.9)
|
66
|
-
mixlib-authentication (~> 1.
|
66
|
+
mixlib-authentication (~> 1.4)
|
67
67
|
mixlib-cli (~> 1.4)
|
68
68
|
mixlib-log (~> 1.3)
|
69
69
|
mixlib-shellout (~> 2.0)
|
70
|
-
net-ssh (
|
70
|
+
net-ssh (>= 2.9, < 4.0)
|
71
71
|
net-ssh-multi (~> 1.1)
|
72
72
|
ohai (>= 8.6.0.alpha.1, < 9)
|
73
73
|
plist (~> 3.1.0)
|
74
|
-
|
75
|
-
rspec-core (~> 3.
|
76
|
-
rspec-expectations (~> 3.
|
77
|
-
rspec-mocks (~> 3.
|
74
|
+
proxifier (~> 1.0)
|
75
|
+
rspec-core (~> 3.4)
|
76
|
+
rspec-expectations (~> 3.4)
|
77
|
+
rspec-mocks (~> 3.4)
|
78
78
|
rspec_junit_formatter (~> 0.2.0)
|
79
79
|
serverspec (~> 2.7)
|
80
80
|
specinfra (~> 2.10)
|
81
81
|
syslog-logger (~> 1.6)
|
82
|
-
|
82
|
+
uuidtools (~> 2.1.5)
|
83
|
+
chef-config (12.7.2)
|
83
84
|
mixlib-config (~> 2.0)
|
84
85
|
mixlib-shellout (~> 2.0)
|
85
86
|
chef-zero (4.6.2)
|
@@ -89,7 +90,6 @@ GEM
|
|
89
90
|
rack
|
90
91
|
uuidtools (~> 2.1)
|
91
92
|
cleanroom (1.0.0)
|
92
|
-
coderay (1.1.1)
|
93
93
|
dep-selector-libgecode (1.2.0)
|
94
94
|
dep_selector (1.0.3)
|
95
95
|
dep-selector-libgecode (~> 1.0)
|
@@ -114,7 +114,6 @@ GEM
|
|
114
114
|
json (1.8.3)
|
115
115
|
json_pure (1.8.3)
|
116
116
|
libyajl2 (1.2.0)
|
117
|
-
method_source (0.8.2)
|
118
117
|
minitar (0.5.4)
|
119
118
|
mixlib-authentication (1.4.0)
|
120
119
|
mixlib-log
|
@@ -126,11 +125,11 @@ GEM
|
|
126
125
|
mixlib-log (1.6.0)
|
127
126
|
mixlib-shellout (2.2.6)
|
128
127
|
molinillo (0.4.5)
|
129
|
-
multi_json (1.12.
|
128
|
+
multi_json (1.12.1)
|
130
129
|
multipart-post (2.0.0)
|
131
130
|
net-scp (1.2.1)
|
132
131
|
net-ssh (>= 2.6.5)
|
133
|
-
net-ssh (
|
132
|
+
net-ssh (3.1.1)
|
134
133
|
net-ssh-gateway (1.2.0)
|
135
134
|
net-ssh (>= 2.6.5)
|
136
135
|
net-ssh-multi (1.2.1)
|
@@ -152,14 +151,11 @@ GEM
|
|
152
151
|
plist (~> 3.1)
|
153
152
|
systemu (~> 2.6.4)
|
154
153
|
wmi-lite (~> 1.0)
|
155
|
-
parser (2.3.1.
|
154
|
+
parser (2.3.1.2)
|
156
155
|
ast (~> 2.2)
|
157
156
|
plist (3.1.0)
|
158
157
|
powerpack (0.1.1)
|
159
|
-
|
160
|
-
coderay (~> 1.1.0)
|
161
|
-
method_source (~> 0.8.1)
|
162
|
-
slop (~> 3.4)
|
158
|
+
proxifier (1.0.3)
|
163
159
|
rack (1.6.4)
|
164
160
|
rainbow (2.1.0)
|
165
161
|
rake (10.5.0)
|
@@ -207,22 +203,21 @@ GEM
|
|
207
203
|
rainbow (>= 1.99.1, < 3.0)
|
208
204
|
ruby-progressbar (~> 1.7)
|
209
205
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
210
|
-
ruby-progressbar (1.8.
|
206
|
+
ruby-progressbar (1.8.1)
|
211
207
|
sawyer (0.7.0)
|
212
208
|
addressable (>= 2.3.5, < 2.5)
|
213
209
|
faraday (~> 0.8, < 0.10)
|
214
210
|
semverse (1.2.1)
|
215
|
-
serverspec (2.
|
211
|
+
serverspec (2.36.0)
|
216
212
|
multi_json
|
217
213
|
rspec (~> 3.0)
|
218
214
|
rspec-its
|
219
215
|
specinfra (~> 2.53)
|
220
216
|
sfl (2.2)
|
221
|
-
slop (3.6.0)
|
222
217
|
solve (2.0.3)
|
223
218
|
molinillo (~> 0.4.2)
|
224
219
|
semverse (~> 1.1)
|
225
|
-
specinfra (2.
|
220
|
+
specinfra (2.59.0)
|
226
221
|
net-scp
|
227
222
|
net-ssh (>= 2.7, < 4.0)
|
228
223
|
net-telnet
|
data/README.md
CHANGED
@@ -55,6 +55,8 @@ to install required plugins for Builderator.
|
|
55
55
|
|
56
56
|
Builderator can automatically detect versions from SCM tags, increment the latest version of an SCM branch by a variety of steps, and create new SCM tags for new versions.
|
57
57
|
|
58
|
+
If the SCM has no version tags, Builderator will try to read the version from a VERSION file in the repository.
|
59
|
+
|
58
60
|
[Additional documentation](docs/versioning.md) describes CLI commands, configuration, and detailed behavior.
|
59
61
|
|
60
62
|
## Generators
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.6
|
data/docs/versioning.md
CHANGED
@@ -33,12 +33,12 @@ If STEP is omitted, Builderator will scan messages of commits between HEAD and t
|
|
33
33
|
|
34
34
|
The `autoversion` namespace has two attributes:
|
35
35
|
|
36
|
-
* `create_tags BOOLEAN` enables auto-generation of SCM tags after `bump` tasks. Default `
|
36
|
+
* `create_tags BOOLEAN` enables auto-generation of SCM tags after `bump` tasks. Default `false`.
|
37
37
|
* `search_tags` enables detection of the current version from SCM tags. Default `true`.
|
38
38
|
|
39
39
|
```ruby
|
40
40
|
autoversion do |version|
|
41
|
-
version.create_tags
|
41
|
+
version.create_tags false
|
42
42
|
version.search_tags true
|
43
43
|
end
|
44
44
|
```
|
@@ -32,6 +32,16 @@ module Builderator
|
|
32
32
|
class << self
|
33
33
|
def current
|
34
34
|
@current ||= SCM.tags.last
|
35
|
+
|
36
|
+
if @current.nil? && Util.relative_path('VERSION').exist?
|
37
|
+
@current = Version.from_string(Util.relative_path('VERSION').read)
|
38
|
+
end
|
39
|
+
|
40
|
+
if @current.nil?
|
41
|
+
fail 'No current version found! Create a VERSION file or set a version tag in your SCM.'
|
42
|
+
end
|
43
|
+
|
44
|
+
@current
|
35
45
|
end
|
36
46
|
|
37
47
|
def set_config_version
|
@@ -12,6 +12,8 @@ module Builderator
|
|
12
12
|
class Berkshelf < Thor
|
13
13
|
include Thor::Actions
|
14
14
|
|
15
|
+
class_option :debug, :type => :boolean, :desc => 'Show debug output'
|
16
|
+
|
15
17
|
def self.exit_on_failure?
|
16
18
|
true
|
17
19
|
end
|
@@ -41,6 +43,7 @@ module Builderator
|
|
41
43
|
empty_directory Interface.berkshelf.vendor
|
42
44
|
|
43
45
|
command = "#{Interface.berkshelf.command} vendor #{Interface.berkshelf.vendor} "
|
46
|
+
command << "-d " if options[:debug]
|
44
47
|
command << "-c #{Interface.berkshelf.berkshelf_config} " unless Interface.berkshelf.berkshelf_config.nil?
|
45
48
|
command << "-b #{Interface.berkshelf.source}"
|
46
49
|
|
@@ -55,6 +58,7 @@ module Builderator
|
|
55
58
|
vendor
|
56
59
|
|
57
60
|
command = "#{Interface.berkshelf.command} upload "
|
61
|
+
command << "-d " if options[:debug]
|
58
62
|
command << "-c #{Interface.berkshelf.berkshelf_config} " unless Interface.berkshelf.berkshelf_config.nil?
|
59
63
|
command << "-b #{Interface.berkshelf.source}"
|
60
64
|
|
data/rvm.env
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
declare -x GEM_HOME="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-
|
2
|
-
declare -x GEM_PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-
|
1
|
+
declare -x GEM_HOME="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-3"
|
2
|
+
declare -x GEM_PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-3:/home/jenkins/.rvm/gems/ruby-2.1.5@global"
|
3
3
|
declare -x HOME="/home/jenkins"
|
4
|
-
declare -x HUDSON_COOKIE="
|
4
|
+
declare -x HUDSON_COOKIE="e12399cc-9dd6-47e7-8fea-246675a1fc27"
|
5
5
|
declare -x IRBRC="/home/jenkins/.rvm/rubies/ruby-2.1.5/.irbrc"
|
6
6
|
declare -x LANG="en_US.UTF-8"
|
7
7
|
declare -x LC_ALL="en_US.UTF-8"
|
8
8
|
declare -x MY_RUBY_HOME="/home/jenkins/.rvm/rubies/ruby-2.1.5"
|
9
9
|
declare -x NLSPATH="/usr/dt/lib/nls/msg/%L/%N.cat"
|
10
10
|
declare -x OLDPWD
|
11
|
-
declare -x PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-
|
11
|
+
declare -x PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-3/bin:/home/jenkins/.rvm/gems/ruby-2.1.5@global/bin:/home/jenkins/.rvm/rubies/ruby-2.1.5/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
|
12
12
|
declare -x PWD="/home/jenkins/workspace/gem-public-builderator-master"
|
13
13
|
declare -x RUBY_VERSION="ruby-2.1.5"
|
14
14
|
declare -x SHLVL="1"
|
data/spec/version_spec.rb
CHANGED
@@ -24,6 +24,19 @@ module Builderator
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
## Test stub with no history
|
28
|
+
module NoHistory
|
29
|
+
extend SCM
|
30
|
+
|
31
|
+
def self.supported?
|
32
|
+
true
|
33
|
+
end
|
34
|
+
|
35
|
+
def self._history
|
36
|
+
[]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
27
40
|
## Disable the Git provider
|
28
41
|
module Git
|
29
42
|
extend SCM
|
@@ -33,6 +46,33 @@ module Builderator
|
|
33
46
|
end
|
34
47
|
end
|
35
48
|
|
49
|
+
RSpec.describe Builderator::Control::Version do
|
50
|
+
before(:context) do
|
51
|
+
SCM.unregister(Test)
|
52
|
+
SCM.register(NoHistory)
|
53
|
+
end
|
54
|
+
|
55
|
+
after(:context) do
|
56
|
+
SCM.unregister(NoHistory)
|
57
|
+
SCM.register(Test)
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'current' do
|
61
|
+
it 'provides an error message if no version is found' do
|
62
|
+
version_file = Util.relative_path('VERSION')
|
63
|
+
version_file.delete if version_file.exist?
|
64
|
+
|
65
|
+
expect(SCM.tags.last).to be_nil
|
66
|
+
expect { Version.current }.to raise_error RuntimeError
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'falls back to VERSION file if no tags are found' do
|
70
|
+
Util.relative_path('VERSION').write('1.2.3')
|
71
|
+
expect(Version.current).to be == Version.from_string('1.2.3')
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
36
76
|
SCM.register(Test)
|
37
77
|
|
38
78
|
RSpec.describe Builderator::Control::Version do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: builderator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Manero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|