chef-dk 2.0.28 → 2.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7c538127b41469986112eb247d10d88cb61ad50
4
- data.tar.gz: 762a7278a191796c23999ef213e4ee759f4c7abd
3
+ metadata.gz: 829f122f43726668a549776bfcf08866bd964d1f
4
+ data.tar.gz: 706b08e7b6fd30398637987668619ce630a3cf99
5
5
  SHA512:
6
- metadata.gz: 0e60359a3e42359a7f0921566aec2eb27b03a601ca01649f1afd6d77eddfc44cea1baaa2d3fd61ce573551c2904d255c74f6a71e9b11df1a0242415c7b962231
7
- data.tar.gz: 6abcb025604915f25f1d27c0ce8531d83dc0b3d0abeb9f8c8bda02840e0be03f4fa54c4fadf6ba74d5d02386ba36b9b45284dce8f0a66f8b146f1cd8ec130fe3
6
+ metadata.gz: 6386fc330b45fd81d06588320e496d6aa166c5b5c071f8f60a4c96467c467a273cf1fbe9a9f419c87387cada9d5200b464329f1b1e8cc13a4b020d8b1875035d
7
+ data.tar.gz: d3319d7259f4190a6368af6d2be959ad50d68e25a81e458ea63f386984895958838ac48c460def6badc30c944f89f042b9d8283c942ce9e62da296a5b2a59dde
data/Gemfile CHANGED
@@ -19,6 +19,9 @@ source "https://rubygems.org"
19
19
 
20
20
  gemspec
21
21
 
22
+ # temporary pin until molinillo is fixed
23
+ gem "molinillo", "< 0.6.0"
24
+
22
25
  gem "bundler"
23
26
 
24
27
  group(:omnibus_package, :development, :test) do
@@ -38,7 +41,7 @@ end
38
41
  # We equality pin the chef gem itself to assert which version we're shipping.
39
42
  group(:omnibus_package) do
40
43
  gem "appbundler"
41
- gem "berkshelf", ">= 6.2"
44
+ gem "berkshelf", ">= 6.3"
42
45
  gem "chef-provisioning", ">= 2.4.0"
43
46
  gem "chef-provisioning-aws", ">= 2.0"
44
47
  gem "chef-provisioning-azure", ">= 0.6.0"
@@ -72,6 +75,7 @@ group(:omnibus_package) do
72
75
  # All of the following used to be software definitions we included:
73
76
  gem "knife-spork"
74
77
  gem "dep-selector-libgecode"
78
+ gem "mixlib-install"
75
79
  gem "nokogiri"
76
80
  gem "pry-byebug"
77
81
  gem "pry-remote"
@@ -93,13 +97,6 @@ group(:ruby_shadow) do
93
97
  gem "ruby-shadow", platform: :ruby
94
98
  end
95
99
 
96
- group(:changelog) do
97
- gem "github_changelog_generator", git: "https://github.com/chef/github-changelog-generator"
98
- end
99
-
100
- # mixlib-install is used by two groups
101
- gem "mixlib-install", :group => [:changelog, :omnibus_package]
102
-
103
100
  # TODO delete this when we figure out how to include the pushy windows dependencies
104
101
  # correctly
105
102
  platforms :mswin, :mingw do
@@ -1,20 +1,7 @@
1
- GIT
2
- remote: https://github.com/chef/github-changelog-generator
3
- revision: 7ab4953b47598dccf10e106058673c1592b8f9bf
4
- specs:
5
- github_changelog_generator (1.14.2)
6
- activesupport
7
- faraday-http-cache
8
- multi_json
9
- octokit (~> 4.6)
10
- rainbow (>= 2.1)
11
- rake (>= 10.0)
12
- retriable (>= 1.4)
13
-
14
1
  PATH
15
2
  remote: .
16
3
  specs:
17
- chef-dk (2.0.28)
4
+ chef-dk (2.1.11)
18
5
  addressable (>= 2.3.5, < 2.6)
19
6
  chef (~> 13.0)
20
7
  chef-provisioning (~> 2.0)
@@ -47,22 +34,21 @@ GEM
47
34
  addressable (>= 2.3.1)
48
35
  extlib (>= 0.9.15)
49
36
  multi_json (>= 1.0.0)
50
- aws-sdk (2.10.10)
51
- aws-sdk-resources (= 2.10.10)
52
- aws-sdk-core (2.10.10)
37
+ aws-sdk (2.10.24)
38
+ aws-sdk-resources (= 2.10.24)
39
+ aws-sdk-core (2.10.24)
53
40
  aws-sigv4 (~> 1.0)
54
41
  jmespath (~> 1.0)
55
- aws-sdk-resources (2.10.10)
56
- aws-sdk-core (= 2.10.10)
42
+ aws-sdk-resources (2.10.24)
43
+ aws-sdk-core (= 2.10.24)
57
44
  aws-sdk-v1 (1.67.0)
58
45
  json (~> 1.4)
59
46
  nokogiri (~> 1)
60
47
  aws-sigv4 (1.0.1)
61
- berkshelf (6.2.0)
62
- addressable (~> 2.3, >= 2.3.4)
63
- berkshelf-api-client (>= 4.0.0)
48
+ berkshelf (6.3.0)
64
49
  buff-config (~> 2.0)
65
50
  buff-extensions (~> 2.0)
51
+ chef (>= 12.7.2)
66
52
  cleanroom (~> 1.0)
67
53
  concurrent-ruby (~> 1.0)
68
54
  faraday (~> 0.9)
@@ -75,8 +61,6 @@ GEM
75
61
  ridley (~> 5.0)
76
62
  solve (> 2.0, < 4.0)
77
63
  thor (~> 0.19, < 0.19.2)
78
- berkshelf-api-client (4.0.1)
79
- chef (>= 12.0)
80
64
  binding_of_caller (0.7.2)
81
65
  debug_inspector (>= 0.0.1)
82
66
  blankslate (2.1.2.4)
@@ -171,10 +155,10 @@ GEM
171
155
  fuzzyurl
172
156
  mixlib-config (~> 2.0)
173
157
  mixlib-shellout (~> 2.0)
174
- chef-provisioning (2.4.0)
158
+ chef-provisioning (2.5.0)
175
159
  cheffish (>= 4.0, < 14.0)
176
160
  inifile (>= 2.0.2)
177
- mixlib-install (>= 1.0, < 3.0)
161
+ mixlib-install (>= 1.0)
178
162
  net-scp (~> 1.0)
179
163
  net-ssh (>= 2.9, < 5.0)
180
164
  net-ssh-gateway (> 1.2, < 3.0)
@@ -201,7 +185,7 @@ GEM
201
185
  winrm-elevated
202
186
  chef-sugar (3.5.0)
203
187
  chef-vault (3.2.0)
204
- chef-zero (13.0.0)
188
+ chef-zero (13.1.0)
205
189
  ffi-yajl (~> 2.2)
206
190
  hashie (>= 2.0, < 4.0)
207
191
  mixlib-log (~> 1.3)
@@ -246,13 +230,11 @@ GEM
246
230
  excon (>= 0.38.0)
247
231
  json
248
232
  erubis (2.7.0)
249
- excon (0.57.1)
233
+ excon (0.58.0)
250
234
  extlib (0.9.16)
251
- faraday (0.12.1)
235
+ faraday (0.12.2)
252
236
  multipart-post (>= 1.2, < 3)
253
- faraday-http-cache (2.0.0)
254
- faraday (~> 0.8)
255
- fauxhai (5.2.0)
237
+ fauxhai (5.3.0)
256
238
  net-ssh
257
239
  ffi (1.9.18)
258
240
  ffi (1.9.18-x64-mingw32)
@@ -267,18 +249,20 @@ GEM
267
249
  libyajl2 (~> 1.2)
268
250
  fission (0.5.0)
269
251
  CFPropertyList (~> 2.2)
270
- fog (1.40.0)
252
+ fog (1.41.0)
271
253
  fog-aliyun (>= 0.1.0)
272
254
  fog-atmos
273
255
  fog-aws (>= 0.6.0)
274
256
  fog-brightbox (~> 0.4)
275
257
  fog-cloudatcost (~> 0.1.0)
276
- fog-core (~> 1.43)
258
+ fog-core (~> 1.45)
277
259
  fog-digitalocean (>= 0.3.0)
278
260
  fog-dnsimple (~> 1.0)
279
261
  fog-dynect (~> 0.0.2)
280
262
  fog-ecloud (~> 0.1)
281
263
  fog-google (<= 0.1.0)
264
+ fog-internet-archive
265
+ fog-joyent
282
266
  fog-json
283
267
  fog-local
284
268
  fog-openstack
@@ -299,7 +283,7 @@ GEM
299
283
  fog-xml (~> 0.1.1)
300
284
  ipaddress (~> 0.5)
301
285
  json (>= 1.8, < 2.0)
302
- fog-aliyun (0.1.0)
286
+ fog-aliyun (0.2.0)
303
287
  fog-core (~> 1.27)
304
288
  fog-json (~> 1.0)
305
289
  ipaddress (~> 0.8)
@@ -312,7 +296,7 @@ GEM
312
296
  fog-json (~> 1.0)
313
297
  fog-xml (~> 0.1)
314
298
  ipaddress (~> 0.8)
315
- fog-brightbox (0.11.0)
299
+ fog-brightbox (0.13.0)
316
300
  fog-core (~> 1.22)
317
301
  fog-json
318
302
  inflecto (~> 0.0.2)
@@ -321,9 +305,9 @@ GEM
321
305
  fog-json (~> 1.0)
322
306
  fog-xml (~> 0.1)
323
307
  ipaddress (~> 0.8)
324
- fog-core (1.44.3)
308
+ fog-core (1.45.0)
325
309
  builder
326
- excon (~> 0.49)
310
+ excon (~> 0.58)
327
311
  formatador (~> 0.2)
328
312
  fog-digitalocean (0.3.0)
329
313
  fog-core (~> 1.42)
@@ -344,6 +328,13 @@ GEM
344
328
  fog-core
345
329
  fog-json
346
330
  fog-xml
331
+ fog-internet-archive (0.0.1)
332
+ fog-core
333
+ fog-json
334
+ fog-xml
335
+ fog-joyent (0.0.1)
336
+ fog-core (~> 1.42)
337
+ fog-json (>= 1.0)
347
338
  fog-json (1.0.2)
348
339
  fog-core (~> 1.0)
349
340
  multi_json (~> 1.10)
@@ -357,7 +348,7 @@ GEM
357
348
  fog-core (~> 1.27)
358
349
  fog-json (~> 1.0)
359
350
  fog-xml (~> 0.1)
360
- fog-profitbricks (3.0.0)
351
+ fog-profitbricks (4.0.0)
361
352
  fog-core (~> 1.42)
362
353
  fog-json (~> 1.0)
363
354
  fog-rackspace (0.1.5)
@@ -376,7 +367,7 @@ GEM
376
367
  fog-sakuracloud (1.7.5)
377
368
  fog-core
378
369
  fog-json
379
- fog-scaleway (0.2.1)
370
+ fog-scaleway (0.3.0)
380
371
  fog-core (~> 1.42)
381
372
  fog-json (~> 1.0)
382
373
  fog-serverlove (0.1.2)
@@ -397,7 +388,7 @@ GEM
397
388
  fog-voxel (0.1.0)
398
389
  fog-core
399
390
  fog-xml
400
- fog-vsphere (1.11.2)
391
+ fog-vsphere (1.11.3)
401
392
  fog-core
402
393
  rbvmomi (~> 1.9)
403
394
  fog-xenserver (0.3.0)
@@ -429,8 +420,8 @@ GEM
429
420
  multi_json (~> 1.10)
430
421
  retriable (~> 1.4)
431
422
  signet (~> 0.6)
432
- googleauth (0.5.1)
433
- faraday (~> 0.9)
423
+ googleauth (0.5.3)
424
+ faraday (~> 0.12)
434
425
  jwt (~> 1.4)
435
426
  logging (~> 2.0)
436
427
  memoist (~> 0.12)
@@ -452,15 +443,15 @@ GEM
452
443
  builder (>= 2.1.2)
453
444
  hashie (3.5.6)
454
445
  highline (1.7.8)
455
- hitimes (1.2.5)
456
- hitimes (1.2.5-x86-mingw32)
446
+ hitimes (1.2.6)
447
+ hitimes (1.2.6-x86-mingw32)
457
448
  htmlentities (4.3.4)
458
449
  httpclient (2.8.3)
459
450
  i18n (0.8.6)
460
451
  inflecto (0.0.2)
461
452
  inifile (3.0.0)
462
453
  iniparse (1.4.4)
463
- inspec (1.31.1)
454
+ inspec (1.33.1)
464
455
  addressable (~> 2.4)
465
456
  faraday (>= 0.9.0)
466
457
  hashie (~> 3.4)
@@ -479,13 +470,13 @@ GEM
479
470
  sslshake (~> 1.2)
480
471
  thor (~> 0.19)
481
472
  toml (~> 0.1)
482
- train (>= 0.24.0, < 1.0)
473
+ train (~> 0.26)
483
474
  ipaddress (0.8.3)
484
475
  iso8601 (0.9.1)
485
476
  jmespath (1.3.1)
486
477
  json (1.8.6)
487
478
  jwt (1.5.6)
488
- kitchen-dokken (2.5.1)
479
+ kitchen-dokken (2.6.1)
489
480
  docker-api (~> 1.33)
490
481
  lockfile (~> 2.1)
491
482
  test-kitchen (~> 1.15)
@@ -501,10 +492,10 @@ GEM
501
492
  hashie (~> 3.4)
502
493
  inspec (>= 0.34.0, < 2.0.0)
503
494
  test-kitchen (~> 1.6)
504
- kitchen-vagrant (1.1.0)
495
+ kitchen-vagrant (1.2.0)
505
496
  test-kitchen (~> 1.4)
506
497
  knife-opc (0.3.2)
507
- knife-push (1.0.2)
498
+ knife-push (1.0.3)
508
499
  chef (>= 12.7.2)
509
500
  knife-spork (1.6.3)
510
501
  app_conf (>= 0.4.0)
@@ -536,7 +527,7 @@ GEM
536
527
  mime-types-data (3.2016.0521)
537
528
  mini_portile2 (2.2.0)
538
529
  minitar (0.5.4)
539
- minitest (5.10.2)
530
+ minitest (5.10.3)
540
531
  mixlib-archive (0.4.1)
541
532
  mixlib-log
542
533
  mixlib-authentication (1.4.1)
@@ -549,11 +540,11 @@ GEM
549
540
  mixlib-versioning
550
541
  thor
551
542
  mixlib-log (1.7.1)
552
- mixlib-shellout (2.2.7)
553
- mixlib-shellout (2.2.7-universal-mingw32)
543
+ mixlib-shellout (2.3.2)
544
+ mixlib-shellout (2.3.2-universal-mingw32)
554
545
  win32-process (~> 0.8.2)
555
546
  wmi-lite (~> 1.0)
556
- mixlib-versioning (1.1.0)
547
+ mixlib-versioning (1.2.2)
557
548
  molinillo (0.5.7)
558
549
  multi_json (1.12.1)
559
550
  multi_test (0.1.2)
@@ -583,7 +574,7 @@ GEM
583
574
  shellany (~> 0.0)
584
575
  octokit (4.7.0)
585
576
  sawyer (~> 0.8.0, >= 0.5.3)
586
- ohai (13.2.0)
577
+ ohai (13.3.0)
587
578
  chef-config (>= 12.5.0.alpha.1, < 14)
588
579
  ffi (~> 1.9)
589
580
  ffi-yajl (~> 2.2)
@@ -602,7 +593,7 @@ GEM
602
593
  uuidtools
603
594
  os (0.9.6)
604
595
  paint (1.0.1)
605
- parallel (1.11.2)
596
+ parallel (1.12.0)
606
597
  parser (2.4.0.0)
607
598
  ast (~> 2.2)
608
599
  parslet (1.5.0)
@@ -632,7 +623,7 @@ GEM
632
623
  rb-fsevent (0.10.2)
633
624
  rb-inotify (0.9.10)
634
625
  ffi (>= 0.5.0, < 2)
635
- rb-readline (0.5.4)
626
+ rb-readline (0.5.5)
636
627
  rbvmomi (1.11.3)
637
628
  builder (~> 3.0)
638
629
  json (>= 1.8)
@@ -698,7 +689,7 @@ GEM
698
689
  addressable (>= 2.3.5, < 2.6)
699
690
  faraday (~> 0.8, < 1.0)
700
691
  semverse (2.0.0)
701
- serverspec (2.39.1)
692
+ serverspec (2.40.0)
702
693
  multi_json
703
694
  rspec (~> 3.0)
704
695
  rspec-its
@@ -711,10 +702,10 @@ GEM
711
702
  jwt (~> 1.5)
712
703
  multi_json (~> 1.10)
713
704
  slop (3.6.0)
714
- solve (3.1.0)
705
+ solve (3.1.1)
715
706
  molinillo (>= 0.5)
716
707
  semverse (>= 1.1, < 3.0)
717
- specinfra (2.68.2)
708
+ specinfra (2.70.1)
718
709
  net-scp
719
710
  net-ssh (>= 2.7, < 5.0)
720
711
  net-telnet
@@ -728,7 +719,7 @@ GEM
728
719
  uuid (~> 2.0)
729
720
  syslog-logger (1.6.8)
730
721
  systemu (2.6.5)
731
- test-kitchen (1.16.0)
722
+ test-kitchen (1.17.0)
732
723
  mixlib-install (>= 1.2, < 3.0)
733
724
  mixlib-shellout (>= 1.2, < 3.0)
734
725
  net-scp (~> 1.1)
@@ -742,7 +733,7 @@ GEM
742
733
  hitimes
743
734
  toml (0.1.2)
744
735
  parslet (~> 1.5.0)
745
- train (0.25.0)
736
+ train (0.26.0)
746
737
  docker-api (~> 1.26)
747
738
  json (>= 1.8, < 3.0)
748
739
  mixlib-shellout (~> 2.0)
@@ -815,7 +806,7 @@ PLATFORMS
815
806
  DEPENDENCIES
816
807
  appbundler
817
808
  artifactory
818
- berkshelf (>= 6.2)
809
+ berkshelf (>= 6.3)
819
810
  bundler
820
811
  chef (= 13.2.20)
821
812
  chef-dk!
@@ -836,7 +827,6 @@ DEPENDENCIES
836
827
  ffi
837
828
  ffi-rzmq-core
838
829
  foodcritic (>= 11.2)
839
- github_changelog_generator!
840
830
  guard
841
831
  inspec (>= 0.29.0)
842
832
  kitchen-dokken (>= 2.5.0)
@@ -851,6 +841,7 @@ DEPENDENCIES
851
841
  listen
852
842
  mixlib-install
853
843
  mixlib-versioning
844
+ molinillo (< 0.6.0)
854
845
  nokogiri
855
846
  ohai (>= 13.1.0)
856
847
  opscode-pushy-client (>= 2.3.0)
@@ -882,4 +873,4 @@ DEPENDENCIES
882
873
  yard
883
874
 
884
875
  BUNDLED WITH
885
- 1.15.1
876
+ 1.15.3
data/Rakefile CHANGED
@@ -16,20 +16,9 @@
16
16
  #
17
17
 
18
18
  require "bundler/gem_tasks"
19
- require_relative "tasks/version"
20
19
  require_relative "tasks/dependencies"
21
- require_relative "tasks/github_changelog_generator"
22
20
  require_relative "tasks/announce"
23
21
 
24
- desc "Keep the Dockerfile up-to-date"
25
- task :update_dockerfile do
26
- require "mixlib/install"
27
- latest_stable_version = Mixlib::Install.available_versions("chefdk", "stable").last
28
- text = File.read("Dockerfile")
29
- new_text = text.gsub(/^ARG VERSION=[\d\.]+$/, "ARG VERSION=#{latest_stable_version}")
30
- File.open("Dockerfile", "w+") { |f| f.write(new_text) }
31
- end
32
-
33
22
  namespace :style do
34
23
  begin
35
24
  require "rubocop/rake_task"
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module ChefDK
19
- VERSION = "2.0.28"
19
+ VERSION = "2.1.11"
20
20
  end
@@ -4,7 +4,7 @@
4
4
  override :rubygems, version: "2.6.11"
5
5
  override :bundler, version: "1.15.1"
6
6
  override "libffi", version: "3.2.1"
7
- override "libiconv", version: "1.14"
7
+ override "libiconv", version: "1.15"
8
8
  override "liblzma", version: "5.2.3"
9
9
  override "libtool", version: "2.4.2"
10
10
  override "libxml2", version: "2.9.4"
@@ -18,5 +18,5 @@ override "ruby-windows-devkit-bash", version: "3.1.23-4-msys-1.0.18"
18
18
  override "util-macros", version: "1.19.0"
19
19
  override "xproto", version: "7.0.28"
20
20
  override "zlib", version: "1.2.11"
21
- override "libzmq", version: "4.0.5"
21
+ override "libzmq", version: "4.0.7"
22
22
  override "openssl", version: "1.0.2l"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-dk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.28
4
+ version: 2.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel DeLeo
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-14 00:00:00.000000000 Z
13
+ date: 2017-08-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mixlib-cli
@@ -605,10 +605,8 @@ files:
605
605
  - tasks/announce.rb
606
606
  - tasks/bin/bundle-platform.bat
607
607
  - tasks/dependencies.rb
608
- - tasks/github_changelog_generator.rb
609
608
  - tasks/templates/prerelease.md.erb
610
609
  - tasks/templates/release.md.erb
611
- - tasks/version.rb
612
610
  - warning.txt
613
611
  homepage: https://www.chef.io/
614
612
  licenses: []
@@ -1,48 +0,0 @@
1
- #
2
- # Copyright:: Copyright (c) 2016 Chef Software Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- begin
19
- require "github_changelog_generator/task"
20
- require "mixlib/install"
21
-
22
- namespace :changelog do
23
- # Fetch the latest version from mixlib-install
24
- latest_stable_version = Mixlib::Install.available_versions("chefdk", "stable").last
25
-
26
- # Take the changelog from the latest stable release and put it into history.
27
- desc "Archive current CHANGELOG to HISTORY"
28
- task :archive do
29
- changelog = Net::HTTP.get(URI("https://raw.githubusercontent.com/chef/chef-dk/v#{latest_stable_version}/CHANGELOG.md")).chomp.split("\n")
30
- File.open("HISTORY.md", "w+") { |f| f.write(changelog[2..-4].join("\n")) }
31
- end
32
-
33
- # Run this to just update the changelog for the current release. This will
34
- # take what is in HISTORY and generate a changelog of PRs between the most
35
- # recent stable version and HEAD.
36
- GitHubChangelogGenerator::RakeTask.new :update do |config|
37
- config.future_release = "v#{ChefDK::VERSION}"
38
- config.between_tags = ["v#{latest_stable_version}", "v#{ChefDK::VERSION}"]
39
- config.max_issues = 0
40
- config.add_issues_wo_labels = false
41
- config.header = "This changelog reflects the current state of chef-dk's master branch on github and may not reflect the current released version of chef-dk, which is [![Gem Version](https://badge.fury.io/rb/chef-dk.svg)](https://badge.fury.io/rb/chef-dk)."
42
- end
43
- end
44
-
45
- task :changelog => "changelog:update"
46
- rescue LoadError
47
- puts "github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs"
48
- end
@@ -1,147 +0,0 @@
1
- #
2
- # Copyright:: Copyright (c) 2016-2017, Chef Software Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- task :ci_version_bump do
19
- begin
20
- require "rake"
21
-
22
- Rake::Task["version:bump_patch"].invoke
23
- Rake::Task["version:update_gemfile_lock"].invoke
24
-
25
- begin
26
- Rake::Task["changelog:update"].invoke
27
- rescue Exception => e
28
- puts "There was an error updating the CHANGELOG"
29
- puts e
30
- end
31
-
32
- begin
33
- Rake::Task["update_dockerfile"].invoke
34
- rescue Exception => e
35
- puts "There was an error updating the Dockerfile"
36
- puts e
37
- end
38
- end
39
- end
40
-
41
- namespace :version do
42
- desc "Bump patch version in lib/chef-dk/version.rb and update Gemfile*.lock conservatively to include the new version. If Gemfile has changed, this will update modified constraints as well."
43
- task :bump => "ci_version_bump"
44
-
45
- # Can be deleted when we migrate fully to expeditor
46
- desc "Show the current version."
47
- task :show do
48
- puts version
49
- end
50
-
51
- def version
52
- if IO.read(version_rb_path) =~ /^\s*VERSION\s*=\s*"([^"]+)"\s*$/
53
- $1
54
- else
55
- raise "Could not read version from #{version_rb_path}. Contents:\n#{IO.read(version_rb_path)}"
56
- end
57
- end
58
-
59
- def version_file
60
- File.expand_path("../../VERSION", __FILE__)
61
- end
62
-
63
- def version_rb_path
64
- File.expand_path("../../lib/chef-dk/version.rb", __FILE__)
65
- end
66
-
67
- def gemfile_lock_path
68
- File.expand_path("../../Gemfile.lock", __FILE__)
69
- end
70
-
71
- def release_notes_path
72
- File.expand_path("../../RELEASE_NOTES.md", __FILE__)
73
- end
74
-
75
- # Can be deleted when we migrate fully to expeditor
76
- # Add 1 to the current patch version in the VERSION file, and write it back out.
77
- desc "Bump the patch version in lib/chef-dk/version.rb."
78
- task :bump_patch do
79
- current_version_file = IO.read(version_rb_path)
80
- new_version = nil
81
- new_version_file = current_version_file.sub(/^(\s*VERSION\s*=\s*")(\d+\.\d+\.)(\d+)/) do
82
- new_version = "#{$2}#{$3.to_i + 1}"
83
- "#{$1}#{new_version}"
84
- end
85
- puts "Updating version in #{version_rb_path} from #{version} to #{new_version.chomp}"
86
- IO.write(version_rb_path, new_version_file)
87
- end
88
-
89
- # Can be deleted when we migrate fully to expeditor
90
- desc "Bump the minor version in lib/chef-dk/version.rb"
91
- task :bump_minor do
92
- current_version_file = IO.read(version_rb_path)
93
- new_version = nil
94
- new_version_file = current_version_file.sub(/^(\s*VERSION\s*=\s*")(\d+)\.(\d+)\.(\d+)/) do
95
- new_version = "#{$2}.#{$3.to_i + 1}.0"
96
- "#{$1}#{new_version}"
97
- end
98
- puts "Updating version in #{version_rb_path} from #{version} to #{new_version.chomp}"
99
- IO.write(version_rb_path, new_version_file)
100
- IO.write(release_notes_path, "# ChefDK #{$2}.#{$3.to_i + 1} Release Notes")
101
- end
102
-
103
- # Can be deleted when we migrate fully to expeditor
104
- desc "Bump the major version in lib/chef-dk/version.rb"
105
- task :bump_major do
106
- current_version_file = IO.read(version_rb_path)
107
- new_version = nil
108
- new_version_file = current_version_file.sub(/^(\s*VERSION\s*=\s*")(\d+)\.(\d+)\.(\d+)/) do
109
- new_version = "#{$2.to_i + 1}.0.0"
110
- "#{$1}#{new_version}"
111
- end
112
- puts "Updating version in #{version_rb_path} from #{version} to #{new_version.chomp}"
113
- IO.write(version_rb_path, new_version_file)
114
- IO.write(release_notes_path, "# ChefDK #{$2.to_i + 1}.0 Release Notes")
115
- end
116
-
117
- # Called from .expeditor/update_version.sh
118
- desc "Propogate the version from VERSION to the necessary parts of the repo"
119
- task :update do
120
- version = IO.read(version_file).chomp
121
-
122
- updated_version_file = IO.read(version_rb_path).sub(/^(\s*VERSION\s*=\s*")(\d+\.\d+\.\d+)/) do
123
- "#{$1}#{version}"
124
- end
125
-
126
- updated_gemfile_lock = IO.read(gemfile_lock_path).gsub!(/^\s*(chef-dk)\s*\((= )?\S+\)\s*$/) do |line|
127
- line.gsub(/\((= )?\d+(\.\d+)+/) { "(#{$1}#{version}" }
128
- end
129
-
130
- IO.write(version_rb_path, updated_version_file)
131
- IO.write(gemfile_lock_path, updated_gemfile_lock)
132
- end
133
-
134
- # Can be deleted when we migrate fully to expeditor
135
- desc "Update the Gemfile.lock to include the current chef-dk version"
136
- task :update_gemfile_lock do
137
- if File.exist?(gemfile_lock_path)
138
- puts "Updating #{gemfile_lock_path} to include version #{version} ..."
139
- contents = IO.read(gemfile_lock_path)
140
- contents.gsub!(/^\s*(chef-dk)\s*\((= )?\S+\)\s*$/) do |line|
141
- line.gsub(/\((= )?\d+(\.\d+)+/) { "(#{$1}#{version}" }
142
- end
143
- IO.write(gemfile_lock_path, contents)
144
- end
145
- end
146
-
147
- end