Class: SixArma::Bt::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/sixarma/bt.rb,
lib/sixarma/bt/svn.rb,
lib/sixarma/bt/nsis.rb,
lib/sixarma/bt/sign.rb,
lib/sixarma/bt/build.rb

Overview

Main Program Class

Constant Summary collapse

COMPONENT =
'SixArma::Bt::Builder'
TYPE_PATTERN =
[
'CHANGED', 'CHANGE', 'C', 'MODIFIED', 'MOD',
'ADDED', 'ADD', 'A',
'FIXED', 'FIX', 'F',
'UPDATED', 'UPDATE', 'UPD', 'U',
'DELETED', 'DELETE', 'DEL', 'REMOVED',
'LOCAL', 'MOVED', 'MOV', 'REVERTED', 'RENAMED', 'R'].join '|'
REGEX_DEVS =
/ace_dev_|ace_support_|wgl_support_|wgl_dev_|wgl_supporter_/i
REGEX_LONG =
/^\s*~?\s*(#{TYPE_PATTERN})\s+-\s*((\w+)(\s*(and|&)\s*(\w+))?(\s*(and|&)\s*(\w+))?):?\s*(.+?)\s*$/i
REGEX_PLACE =
/^\s*~?\s*(#{TYPE_PATTERN})\s+(\w+_\w+):\s*(.+?)\s*$/i
REGEX_TYPE1 =
/^\s*~?\s*(#{TYPE_PATTERN})\s*?[\s:]\s*(.+?)\s*$/i
REGEX_TYPE2 =
/^\s*~?\s*(#{TYPE_PATTERN})\s+(.+?)\s*$/i
REGEX_COMMENT1 =
/^\s*~\s*(.*?)\s*$/
REGEX_COMMENT2 =
/^\s*(.*?)\s*$/
REGEX_LOCAL =
/version tag|buildscripts?|build[_\s+]|readme|credits|\.txt|\.bat|changelog| txt |this/i
REGEX_NOGO =
/penis|dildo|noob/i
REGEX_NIL =
/^\s*([:\-\.~,]|\**)\s*/
REGEX_FIRST =
/^\w+/
REGEX_TODO =
/TODO|RESTORED/i
REGEX_CHANGED =
/^CH?A?N?G?E?D?/i
REGEX_MODIFIED =
/^MODIFIED|MOD|RENAMED/i
REGEX_ADDED =
/^AD?D?E?D?/i
REGEX_REMOVED =
/^RE?M?O?V?E?D/i
REGEX_DELETED =
/^DELE?T?E?D?/i
REGEX_UPDATED =
/^UP?D?A?T?E?D?/i
REGEX_FIXED =
/^FI?X?E?D?/i
REGEX_MOVED =
/^MOVE?D?/i
REGEX_REVERT =
/^LOCAL|REVERTE?D?/i
REGEX_VERSION =
/(.)\.(.)(.)/
@@log =
SixArma::Bt.log

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(yaml, halt) ⇒ Builder

yaml

Yaml configuration file

halt

Wait for user input every step?



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/sixarma/bt.rb', line 121

def initialize(yaml, halt)
  @@log.info "Start Time: #{Time.now}"

  @halt = halt
  @threads = []
  @stats = STATS.new()
  if FileTest.exist?(yaml)
    @@log.info "Reading From Configuration File: #{yaml}"
    File.open(yaml) { |yf| @config = YAML::load( yf ) }
  else
    @@log.info "Yaml file not found (#{yaml})"
    Process.exit
  end
  read_stats()
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



116
117
118
# File 'lib/sixarma/bt.rb', line 116

def config
  @config
end

#statsObject (readonly)

Returns the value of attribute stats.



116
117
118
# File 'lib/sixarma/bt.rb', line 116

def stats
  @stats
end

#threadsObject

Returns the value of attribute threads.



117
118
119
# File 'lib/sixarma/bt.rb', line 117

def threads
  @threads
end

Instance Method Details

#addon_changesObject

Meta method that launches pbotools_build and copy_stuff on each mod and subfolder



119
120
121
122
123
124
125
126
127
128
# File 'lib/sixarma/bt/build.rb', line 119

def addon_changes()
  @config.mods.each do |mod|
    mod.subfolders.each do |folder|
      @@log.info SixCore::prep_msg("BuildChanges - #{mod.destination}/#{folder.name}", :format => 'title')
      pbotools_build(mod, folder) if folder.type == 'addons'
      copy_stuff(mod, folder)
    end
  end
  SixCore::halt() if @halt
end

#build_fullObject

Builds Full svn_do, clear, addon_changes, update_all('update', 'full'), sign_full



544
545
546
547
548
549
550
# File 'lib/sixarma/bt.rb', line 544

def build_full()
  svn_do()
  clear()
  addon_changes()
  update_all('update', 'full')
  sign_full()
end

#build_updateObject

Builds Update svn_do, addon_changes, sign_update



536
537
538
539
540
# File 'lib/sixarma/bt.rb', line 536

def build_update()
  svn_do()
  addon_changes()
  sign_update()
end

#clearObject

Clears all mods and their subfolders



108
109
110
111
112
113
114
115
116
# File 'lib/sixarma/bt/build.rb', line 108

def clear()
  @config.mods.each do |mod|
    mod.subfolders.each do |folder|
      @@log.info SixCore::prep_msg("Clear Addon Folders - #{mod.destination}/#{folder.name}", :format => 'title')
      clear_folders(mod, folder)
    end
  end
  SixCore::halt() if @halt
end

#complete(thread = true) ⇒ Object

Executes Complete Process on Update and Full create_update, dist_update, nsis_full, dist_full

thread

Boolean: Uses seperate thread when set to true



605
606
607
608
609
610
611
# File 'lib/sixarma/bt.rb', line 605

def complete(thread = true)
  create_update()
  dist_update(thread)
  nsis_full()
  dist_full(thread)
  @threads.each { |t| t.join } if thread
end

#create_allObject

Creates Update and Full create_update, nsis_full



569
570
571
572
# File 'lib/sixarma/bt.rb', line 569

def create_all()
  create_update()
  nsis_full()
end

#create_fullObject

Creates Full build_full, nsis_full



562
563
564
565
# File 'lib/sixarma/bt.rb', line 562

def create_full()
  build_full()
  nsis_full()
end

#create_updateObject

Creates Update build_full, update_sign('full', 'update'), nsis_update



554
555
556
557
558
# File 'lib/sixarma/bt.rb', line 554

def create_update()
  build_full()
  update_sign('full', 'update')
  nsis_update()
end

#dist_all(thread = false) ⇒ Object

Distributes Update and Full

thread

Boolean: Uses seperate thread when set to true



596
597
598
599
600
# File 'lib/sixarma/bt.rb', line 596

def dist_all(thread = false)
  dist_update(thread)
  dist_full(thread)
  @threads.each { |t| t.join } if thread
end

#dist_full(thread = false) ⇒ Object

Distributes Full

thread

Boolean: Uses seperate thread when set to true



586
587
588
589
590
591
592
# File 'lib/sixarma/bt.rb', line 586

def dist_full(thread = false)
  if thread
    upload_thread('full')
  else
    upload(@stats.fullfile, 'full')
  end
end

#dist_update(thread = false) ⇒ Object

Distributes Update

thread

Boolean: Uses seperate thread when set to true



576
577
578
579
580
581
582
# File 'lib/sixarma/bt.rb', line 576

def dist_update(thread = false)
  if thread
    upload_thread('update')
  else
    upload(@stats.updatefile, 'update')
  end
end

#gen_clog(stream) ⇒ Object



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/sixarma/bt.rb', line 467

def gen_clog(stream)
  ar = []
  Dir["#{@config.outroot}/versions/*.yaml"].each do |f|
    ar << f
  end
  ar.reverse!
  @@log.info "Replaying logfiles from Stats Files: #{ar.first} - #{ar.last}"
  ar.each do |f|
    File.open(f) do |yf|
      stats = YAML::load(yf)
      stream.puts ''
      stream.puts "== v#{stats.newver} =="
      stats.mods.each_with_index do |mod, idx|
        mod2 = @config.mods[idx]
        generate_log(mod, mod2, stream, 1) unless mod2.svn.nil?
      end
    end
  end
end

#generate_log(mod, mod2, stream, type) ⇒ Object

Generates log from svn comments

mod

Object, Mod object



489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/sixarma/bt.rb', line 489

def generate_log(mod, mod2, stream, type)
  return if mod.oldrev == mod.newrev

  changelog = mod.changelog

  return if changelog.values.inject(true) { |b, a| b and a.empty? }
  case type
  when 1
    stream.puts "* #{mod2.destination}, Revision: #{mod.newrev} - #{mod.oldrev}"
  when 2
    stream.puts "* #{mod2.destination} v#{@stats.newver}, Revision: #{mod.newrev} - #{mod.oldrev}"
  end
  generate_log_entries(changelog.added, 'ADDED', stream)
  generate_log_entries(changelog.updated, 'UPDATED', stream)
  generate_log_entries(changelog.removed, 'REMOVED', stream)
  generate_log_entries(changelog.changed, 'CHANGED', stream)
  generate_log_entries(changelog.fixed, 'FIXED', stream)
end

#generate_log_entries(changelog, type, stream) ⇒ Object



508
509
510
511
512
513
514
# File 'lib/sixarma/bt.rb', line 508

def generate_log_entries(changelog, type, stream)
  return if changelog.empty?

  stream.puts "** #{type}:"
  changelog.each do |line| stream.puts "*** #{line}" end
  stream.puts
end

#nsis_build(type) ⇒ Object

Build an NSIS setup file

type

update or full



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/sixarma/bt/nsis.rb', line 6

def nsis_build(type)
  @@log.info SixCore::prep_msg("Nsis Build - #{type}", :format => 'title')
  cfg = @config.nsis

  newdelete = "";
  @config.mods.each do |mod|
    mod.subfolders.each do |folder|
      del = File.open("#{mod.changes}/#{@config.workdel}_#{folder.name}.txt") do |file|
        file.readlines.map { |line| SixCore::clean(line) }
      end
      del.each { |item| newdelete += "\n    Delete \"#{mod.nsis.out}/#{folder.name}/#{item}.*\"" }
    end
  end

  replace = [
    [cfg.reg_newver, SixCore::quote(@stats.newver)],
    [cfg.reg_oldver, SixCore::quote(@stats.oldver)],
    [cfg.reg_verpath, @config.verpath],
    [cfg.reg_out, cfg.out],
    [cfg.reg_delete, newdelete],
    [cfg.reg_type, type]
  ]

  out = "#{cfg.out}_v#{@stats.newver}#{type}.exe"
  nsis = SixCore::Nsis.new("#{@config.outroot}/#{cfg.template}", "#{@config.outroot}/#{cfg.output}")
  @@log.info "Creating Setup File: #{out}..."
  nsis.create_output(replace)
  size = (File.size("#{@config.outroot}/#{out}") / 1024) / 1024
  @@log.info "Finished Creating Setup File: #{out} (#{size}MB)..."

  return out
end

#nsis_fullObject

Build NSIS Full nsis_build('full')



49
50
51
52
53
# File 'lib/sixarma/bt/nsis.rb', line 49

def nsis_full()
  @stats.fullfile = nsis_build('full')
  write_stats()
  SixCore::halt() if @halt
end

#nsis_updateObject

Build NSIS Update nsis_build('update')



41
42
43
44
45
# File 'lib/sixarma/bt/nsis.rb', line 41

def nsis_update()
  @stats.updatefile = nsis_build('update')
  write_stats()
  SixCore::halt() if @halt
end

#read_changelog(readrev = true) ⇒ Object



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/sixarma/bt.rb', line 328

def read_changelog(readrev = true)
  @stats.mods.each_with_index do |mod, idx|
    mod.changelog = STATS_MOD_CHANGELOG.new()
    mod.changelog.changed, mod.changelog.removed, mod.changelog.fixed = [], [], []
    mod.changelog.added, mod.changelog.updated, mod.changelog.local = [], [], []
    mod2 = @config.mods[idx]
    unless mod2.svn.nil?
      svn = SixCore::Svn.new("#{mod2.path}#{mod2.source}", mod2.svn.user, mod2.svn.pass)
      mod.newrev = svn.read_rev() if readrev
      unless mod.oldrev == mod.newrev
        log_orig = svn.log_split(mod.oldrev.to_i + 1, mod.newrev)
        log_orig.each do |l|
          if l[1].size > 0
            # TODO Pretify

            name = l[0][1]
            name.gsub!(REGEX_DEVS, '')
            name.capitalize!
            @names[name] += 1
            l[1].each do |c|
              if true #c =~ /^\s*~\s*/

                is_valid, type, places, comment = case c
                when REGEX_LONG
                  # ~ type - place: comment

                  # ~ type - place comment

                  # ~ type - place

                  # type - place: comment

                  # type - place comment

                  # type - place

                  # where 'place' can be 'place' or 'place and place' or 'place and place and place'

                  # where 'and' can be 'and' or '&'


                  found = [$3]
                  found.push $6 unless $6.nil?
                  found.push $9 unless $9.nil?

                  [true, $1, found, $10]

                when REGEX_PLACE
                  # ~ type place: comment

                  # type place: comment

                  [true, $1, [$2], $3]

                when REGEX_TYPE1
                  # ~ type comment

                  # type comment

                  # ~ type: comment

                  # type: comment

                  [true, $1, [], $2]

                when REGEX_TYPE2
                  [true, $1, [], $2]

                when REGEX_COMMENT1
                  # ~ comment

                  [true, 'CHANGED', [], $1]

                when REGEX_COMMENT2
                  # comment

                  [true, 'LOCAL', [], $1]

                else
                  [false, '', '', '']
                end

                if is_valid
                  case comment
                  when REGEX_LOCAL
                    type = 'LOCAL'
                  end
                  comment.gsub!(REGEX_NOGO, '****')
                  comment.gsub!(REGEX_NIL, '')
                  # FIXME: Shouldn't this be possible with just 1* regex?

                  comment.gsub!(REGEX_NIL, '')
                  comment.gsub!('http', 'ticket: http')
                  unless comment.empty?
                    f = comment[REGEX_FIRST]
                    unless f.nil?
                      case f
                        #when /REMOVED|DELETED/i

                        #  type = 'REMOVED'

                        #  comment.sub!(f, '')

                        #  comment.gsub!(/^[:\-\.~]/, '')

                        #  f = comment[/^\w+/]

                      when REGEX_TODO
                        type = 'LOCAL'
                      end
                      # Capitalize only first word

                      comment.gsub!(REGEX_FIRST, '')
                      f.capitalize!
                      comment = "#{f}#{comment}"
                    end
                    if places.empty?
                      entry = comment
                    else
                      entry = "#{comment} - #{places}"
                    end
                    entry = "#{entry} [#{name}]"
                    case type
                    when REGEX_CHANGED, REGEX_MODIFIED
                      mod.changelog.changed << entry
                    when REGEX_ADDED
                      mod.changelog.added << entry
                    when REGEX_REMOVED, REGEX_DELETED
                      mod.changelog.removed << entry
                    when REGEX_UPDATED
                      mod.changelog.updated << entry
                    when REGEX_FIXED
                      mod.changelog.fixed << entry
                    when REGEX_MOVED, REGEX_REVERT
                      mod.changelog.local << entry
                    end
                  end
                end
              end
            end
          end
        end
      end
      mod.changelog.values.each do |log|
        log.uniq!
        log.sort!
      end

      @@log.info "SVN #{mod2.destination} Current Rev: #{mod.newrev} | Previous Rev: #{mod.oldrev}"
    end
  end
end

#read_statsObject

Reads stats from yaml version file



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/sixarma/bt.rb', line 235

def read_stats()
  # TODO: Prettify

  dir = Dir["#{@config.outroot}/versions/*.yaml"]
  if dir.size > 0
    dir.reverse!
    File.open(dir[0]) do |yf|
      @@log.info "Reading From Stats File: #{dir[0]}"
      stats = YAML::load(yf)
      if stats.released
        @@log.info 'Previous version was released; New Version'
        @stats = STATS.new()
        @stats.mods = []
        @stats.oldver = stats.newver.to_s
        @stats.newver = @stats.oldver.to_f + 0.01
        @stats.newver = @stats.newver.to_s
        # TODO: Prettify??

        @stats.newver << '0' # always append extra 0 due to floating point 0.50 --> 0.5

        @stats.oldver << '0' # always append extra 0 due to floating point 0.50 --> 0.5

        @stats.newver = @stats.newver[REGEX_VERSION].to_s
        @stats.oldver = @stats.oldver[REGEX_VERSION].to_s

        @stats.released = false
        stats.mods.each do |mod|
          modstats = STATS_MOD.new()
          modstats.subfolders = []
          mod.subfolders.each do
            sf = STATS_MOD_SUBFOLDERS.new()
            sf.add, sf.del, sf.change = [], [], []
            modstats.subfolders << sf
          end
          modstats.oldrev = mod.newrev
          @stats.mods << modstats
        end
      else
        @@log.info 'Previous version wasn\'t released; Sticking to current version'
        @stats = stats
      end
    end
  else
    info 'No version yaml found in versions folder, aborting'
    Process.exit
  end

  @@log.info "Current Version: #{@stats.newver} | Previous Version: #{@stats.oldver}"

  # update the version files

  @@log.info 'Updating version.txt...'
  # used by updater setup program

  File.open("#{@config.outroot}/files/update/#{@config.mods[0].destination}/#{@config.verpath}/version.txt", 'w') do |f|
    f << @stats.newver
  end

  # used ingame

  unless @config.veraddon.nil?
    verfile = File.open(
      "#{@config.mods[0].path}/#{@config.mods[0].source}/Addons/#{@config.veraddon}/version.hpp",
      'w') do |f|
      f.puts "VERSION = \"#{@stats.newver}\";"
      f.puts "text = \"#{@config.title} v#{@stats.newver}\";"
    end
  end

  @names = Hash.new(0)
  #tmp


  read_changelog()
  # Write per mod per version changelog

  write_changelog()

  # Write Stats

  write_stats()

  # Write all in one changelog all versions and mods

  @@log.info SixCore::prep_msg 'Writing Changelog', :format => 'title'
  write_changelog2()
  @@log.info 'Latest Commits by:'
  @names.each do |k, v|
    @@log.info "#{k}: #{v} commits"
  end
end

#releaseObject

Releases uploaded update/full setup files



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/sixarma/bt.rb', line 211

def release()
  @@log.info "Releasing #{@stats.newver}..."
  @config.ftp.each do |f|
    begin
      raise 'Error' if @stats.fullfile.nil? && @stats.updatefile.nil?
      ftp = SixCore::Ftp.new(f.host, f.user, f.pass)
      ftp.rename("#{@stats.fullfile}_tmp", @stats.fullfile, f.pathfull) unless @stats.fullfile.nil?
      ftp.rename("#{@stats.updatefile}_tmp", @stats.updatefile, f.pathupdate) unless @stats.updatefile.nil?
      ftp.ftp.close
    rescue
      # TODO: Evaluate direct log

      SixCore::log.fatal 'Renaming files on FTP; Something went wrong, please verify!'
      Process.exit
    ensure
      ftp.ftp.close unless ftp.nil?
    end
  end
  @stats.released = true
  @@log.info "Version Info: #{@stats.newver} Released!"

  write_stats()
end

#sign_fullObject

Sign Full sign_do('full')



93
94
95
96
# File 'lib/sixarma/bt/sign.rb', line 93

def sign_full()
  sign_do('full')
  SixCore::halt() if @halt
end

#sign_updateObject

Sign Update sign_do('update')



86
87
88
89
# File 'lib/sixarma/bt/sign.rb', line 86

def sign_update()
  sign_do('update')
  SixCore::halt() if @halt
end

#svn_doObject

Meta method, runs generate and write_list for every mod



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/sixarma/bt/svn.rb', line 119

def svn_do()
  @config.mods.each_with_index do |mod,idx|
    @@log.info SixCore::prep_msg("SVN Sync - #{mod.destination}", :format => 'title')
    # Clean arrays

    @stats.mods[idx].subfolders.each do |f|
      f.add = []
      f.del = []
      f.change = []
    end
    # TODO: Proper this lame stuff

    if idx == 0
      @stats.mods[idx].subfolders[0].change << @config.veraddon unless @stats.mods[idx].subfolders[0].change.include?(@config.veraddon)
    end
    svn_generate(mod, @stats.mods[idx])
    svn_write_list(mod, @stats.mods[idx])
  end
  write_stats()
  SixCore::halt() if @halt
end

#tmpObject

Experimental: "Replay SVN Log and Reimport"



317
318
319
320
321
322
323
324
325
326
# File 'lib/sixarma/bt.rb', line 317

def tmp
  Dir["#{@config.outroot}/versions/*.yaml"].each do |f|
    File.open(f) do |yf|
      @@log.info "Reading From Stats File: #{f}"
      @stats = YAML::load(yf)
      read_changelog(false)
      write_stats()
    end
  end
end

#upload(put, type, tmp = true) ⇒ Object

Upload file

put

File to upload

type

Type (update or full)



181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/sixarma/bt.rb', line 181

def upload(put, type, tmp = true)
  @@log.info SixCore::prep_msg('Upload', :format => 'title')
  @config.ftp.each do |f|
    path = eval "f.path#{type}"
    @@log.info "Uploading #{put} to #{f.host}/#{path}..."
    ftp = SixCore::Ftp.new(f.host, f.user, f.pass)
    ftp.put(put, "#{@config.outroot}/", path, true, tmp)
    ftp.ftp.close
  end
  @@log.info "Uploading #{put} finished!"
  SixCore::halt() if @halt
end

#upload_thread(type) ⇒ Object

Uploads in seperate thread

type

String, update or full



196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/sixarma/bt.rb', line 196

def upload_thread(type)
  name = eval("@stats.#{type}file")
  tmp = []
  @config.ftp.each do |f|
    tmp << [f.host, f.user, f.pass, eval("f.path#{type}"), "#{@config.outroot}/", name]
  end
  @threads << Thread.new(tmp,name) do |ftps,name|
    @@log.info SixCore::prep_msg('Upload', :format => 'title')
    @@log.info "Uploading #{name}..."
    ftps.each { |f| upload_raw(*f) }
    @@log.info "Uploading #{name} finished..."
  end
end

#write_changelogObject

Formats and writes changelog for current version



525
526
527
528
529
530
531
532
# File 'lib/sixarma/bt.rb', line 525

def write_changelog()
  @stats.mods.each_with_index do |mod, idx|
    mod2 = @config.mods[idx]
    File.open("#{@config.mods[idx].changes}/changelog.txt", 'w') do |lf|
      generate_log(mod, mod2, lf, 2)
    end unless mod2.svn.nil?
  end
end

#write_changelog2Object

Formats and writes changelog for all versions



517
518
519
520
521
522
# File 'lib/sixarma/bt.rb', line 517

def write_changelog2()
  File.open("#{@config.outroot}/files/update/#{@config.mods[0].destination}/Docs/#{@config.changelog}.txt", 'w') do |lf|
    lf.puts '= Changelog ='
    gen_clog(lf)
  end
end

#write_statsObject

Writes stats to yaml version file



457
458
459
460
461
462
463
464
# File 'lib/sixarma/bt.rb', line 457

def write_stats()
  @@log.debug SixCore::prep_msg('Writing Version Stats', :format => 'title')
  @@log.debug "Current Ver: #{@stats.newver}"

  File.open("#{@config.outroot}/versions/_version_#{@stats.newver}.yaml", 'w' ) do |out|
    YAML.dump( @stats, out )
  end
end