simp-rake-helpers 3.1.2 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec46ab6ca3ff2615f06d8552bc34c2fbf04b9119
4
- data.tar.gz: 5a4dba95fa0eef1f1f62f7b76e158b7a4f15b8d9
3
+ metadata.gz: 04f0b9f052a35c5a21e97ac67ab1ad65a5557e8f
4
+ data.tar.gz: 5684a31924f21f62cee1db140512e74f24115866
5
5
  SHA512:
6
- metadata.gz: d210e9e63829deb0369e30570f4d66530aac76641f449a39c627a3dbc38ad85d3e7b1bf026ae47af9cb1fa21826f7405cc6f925d8dc3e7ce17af2569c4301317
7
- data.tar.gz: cc5b83ad98dd7fdccd901643554ee85f659bc9b1fd5b669d22d2a3fa0922384072bd3a62286442227c9db1e4054f3377fcc7704b907ab7d89fe8471dce3e7a75
6
+ metadata.gz: 49d3ce2a0da2bfb914b48df402e521406b5073b7ff5226ce1ab4008b725366d37d55d38443b89c20b3640d6d5a34893d3a3b3e453e1b3290350a7929525d3653
7
+ data.tar.gz: b5741af61038d604f265331f195fa908804e8586a2b638467d54f812cf15c6c3211cb7128a327c22169607bb6431f86b5ca9171c9173db786b1031989b12a9bd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 3.1.3 / 2016-12-02
2
+ * Fixed issues with looping through the build directories
3
+
1
4
  ### 3.1.2 / 2016-12-02
2
5
  * Look for the DVD directory in the distribution directories
3
6
 
@@ -52,7 +52,7 @@ module Simp::Rake::Build
52
52
  Will default to a full build and *will* erase existing artifacts.
53
53
  - SIMP_BUILD_staging_dir => Path to stage big build assets
54
54
  [Default: './SIMP_ISO_STAGING']
55
- - SIMP_BUILD_rm_staging_dir => 'yes' forcibly removes the staging dir before starting
55
+ - SIMP_BUILD_rm_staging_dir => 'no' do not forcibly remove the staging dir before starting
56
56
  - SIMP_BUILD_force_dirty => 'yes' tries to checks out subrepos even if dirty
57
57
  - SIMP_BUILD_docs => 'yes' builds & includes documentation
58
58
  - SIMP_BUILD_checkout => 'no' will skip the git repo checkouts
@@ -90,10 +90,8 @@ module Simp::Rake::Build
90
90
  do_packer_vars = ENV.fetch('SIMP_BUILD_packer_vars', 'yes') == 'yes'
91
91
  verbose = ENV.fetch('SIMP_BUILD_verbose', 'no') == 'yes'
92
92
  prompt = ENV.fetch('SIMP_BUILD_prompt', 'yes') != 'no'
93
- pwd = Dir.pwd
94
- repo_root_dir = File.expand_path( @base_dir )
95
93
  method = ENV.fetch('SIMP_BUILD_puppetfile','tracking')
96
- do_rm_staging = ENV['SIMP_BUILD_rm_staging_dir'] == 'yes'
94
+ do_rm_staging = ENV.fetch('SIMP_BUILD_rm_staging_dir', 'yes') == 'yes'
97
95
  do_docs = ENV['SIMP_BUILD_docs'] == 'yes' ? 'true' : 'false'
98
96
  do_merge = ENV['SIMP_BUILD_unpack_merge'] != 'no'
99
97
  do_prune = ENV['SIMP_BUILD_prune'] != 'no' ? 'true' : 'false'
@@ -102,7 +100,6 @@ module Simp::Rake::Build
102
100
  do_unpack = ENV['SIMP_BUILD_unpack'] != 'no'
103
101
  full_iso_name = ENV.fetch('SIMP_BUILD_iso_name', false)
104
102
  iso_name_tag = ENV.fetch('SIMP_BUILD_iso_tag', false)
105
- tarball = false
106
103
 
107
104
  iso_status = {}
108
105
 
@@ -117,6 +114,9 @@ module Simp::Rake::Build
117
114
  end
118
115
 
119
116
  @os_build_metadata['distributions'][distro][version]['arch'].sort.each do |arch|
117
+ tarball = false
118
+ repo_root_dir = File.expand_path( @base_dir )
119
+
120
120
  begin
121
121
  distro_build_dir = File.join(@distro_build_dir, distro, version, arch)
122
122
 
@@ -185,6 +185,10 @@ module Simp::Rake::Build
185
185
  " '#{output_dir}'\n\n"
186
186
  end
187
187
 
188
+ unless File.directory?(output_dir)
189
+ FileUtils.mkdir_p(output_dir)
190
+ end
191
+
188
192
  # Look up ISOs against known build assets
189
193
  # --------------------
190
194
  target_data = get_target_data(target_release, iso_paths, yaml_file, do_checksum, verbose )
@@ -208,8 +212,11 @@ module Simp::Rake::Build
208
212
  puts
209
213
  puts " (skip with `SIMP_BUILD_checkout=no`)"
210
214
  puts '='*80
215
+
211
216
  Dir.chdir repo_root_dir
217
+ Rake::Task['deps:status'].reenable
212
218
  Rake::Task['deps:status'].invoke
219
+
213
220
  if @dirty_repos && !ENV['SIMP_BUILD_force_dirty'] == 'yes'
214
221
  raise SIMPBuildException, "ERROR: Dirty repos detected! I refuse to destroy uncommitted work."
215
222
  else
@@ -217,6 +224,7 @@ module Simp::Rake::Build
217
224
  puts '-'*80
218
225
  puts "#### Checking out subrepositories using method '#{method}'"
219
226
  puts '-'*80
227
+ Rake::Task['deps:checkout'].reenable
220
228
  Rake::Task['deps:checkout'].invoke(method)
221
229
  end
222
230
 
@@ -226,6 +234,7 @@ module Simp::Rake::Build
226
234
  puts "#### Running bundler in all repos"
227
235
  puts ' (Disable with `SIMP_BUILD_bundle=no`)'
228
236
  puts '-'*80
237
+ Rake::Task['build:bundle'].reenable
229
238
  Rake::Task['build:bundle'].invoke
230
239
  else
231
240
  puts
@@ -260,6 +269,7 @@ module Simp::Rake::Build
260
269
  # Horrible state passing magic vars
261
270
  $tarball_tgt = File.join(distro_build_dir, 'DVD_Overlay', "SIMP-#{@simp_version}-#{distro}-#{version}-#{arch}.tar.gz")
262
271
 
272
+ Rake::Task['tar:build'].reenable
263
273
  Rake::Task['tar:build'].invoke(target_data['mock'],key_name,do_docs)
264
274
 
265
275
  tarball = $tarball_tgt
@@ -271,6 +281,7 @@ module Simp::Rake::Build
271
281
  puts '-'*80
272
282
  puts "#### rake build:yum:sync[#{target_data['flavor']},#{target_data['os_version']}]"
273
283
  puts '-'*80
284
+ Rake::Task['build:yum:sync'].reenable
274
285
  Rake::Task['build:yum:sync'].invoke(target_data['flavor'],target_data['os_version'])
275
286
 
276
287
  # If you have previously downloaded packages from yum, you may need to run
@@ -310,23 +321,24 @@ module Simp::Rake::Build
310
321
  puts
311
322
  end
312
323
 
313
- Dir.chdir repo_root_dir
324
+ Dir.chdir staging_dir
314
325
 
315
326
  puts
316
327
  puts '='*80
317
- puts "#### iso:build[#{tarball}]"
328
+ puts "#### iso:build[#{tarball}, #{staging_dir}, #{do_prune}]"
318
329
  puts '='*80
319
330
  puts
320
331
 
321
332
  ENV['SIMP_ISO_verbose'] = 'yes' if verbose
322
333
  ENV['SIMP_PKG_verbose'] = 'yes' if verbose
334
+ Rake::Task['iso:build'].reenable
323
335
  Rake::Task['iso:build'].invoke(tarball,staging_dir,do_prune)
324
336
 
325
- _isos = Dir[ File.join(Dir.pwd,'SIMP-*.iso') ]
337
+ _isos = Dir[ File.join(staging_dir, 'SIMP-*.iso') ]
326
338
  if _isos.size == 0
327
- fail "ERROR: No SIMP ISOs found in '#{Dir.pwd}'"
339
+ fail "ERROR: No SIMP ISOs found in '#{staging_dir}'"
328
340
  elsif _isos.size > 1
329
- warn "WARNING: More than one SIMP ISO found in '#{Dir.pwd}'"
341
+ warn "WARNING: More than one SIMP ISO found in '#{staging_dir}'"
330
342
  _isos.each{ |i| warn i }
331
343
  end
332
344
 
@@ -416,6 +428,7 @@ module Simp::Rake::Build
416
428
  end
417
429
 
418
430
  unless successful_isos.empty?
431
+ puts '='*80
419
432
  puts '='*80
420
433
  puts("Successful ISOs:")
421
434
  puts(%( * #{successful_isos.join("\n * ")}))
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '3.1.2'
5
+ VERSION = '3.1.3'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rake-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-02 00:00:00.000000000 Z
12
+ date: 2016-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler