Changeset 1293


Ignore:
Timestamp:
Nov 22, 2008, 12:57:52 PM (17 years ago)
Author:
John Small
Message:

ReleaseTool/Edit: 1) Tighter edits on user-supplied version numbers;
2) Display of "previous action"; 3) Disable WARNALL for release build;
4) Cosmetic changes

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ReleaseEdit.cmd

    r1291 r1293  
    6464else if stream(file, 'c', 'query exists') = '' then
    6565   call Usage           /* and exit */
    66 /* Set extension, if none set it to uppercase(file) */
    67 ext = substr(translate(file), lastpos('.', file) +1)
    6866parse var ver major '.' minor '.' CSDLevel
    6967if CSDlevel = '' then
    7068   CSDlevel = 0
    7169
     70if datatype(major) \= 'NUM' | datatype(minor) \= 'NUM' | datatype(CSDlevel) \= 'NUM' then
     71   call Usage
     72ver = major || '.' || minor || '.' || CSDlevel
     73
     74/* Set extension, if none set it to uppercase(file) */
     75ext = substr(translate(file), lastpos('.', file) +1)
     76
    7277/* Prepare temporary file */
    7378call RxFuncAdd 'SysTempFilename', 'REXXUTIL', 'SysTempFilename'
    7479tmpfile = SysTempFilename('redittmp.???')
    75 'copy' file tmpfile
     80'@copy' file tmpfile '1>nul 2>nul'
    7681if rc \= 0 then
    7782   do
     
    8085   end
    8186if wordpos(ext, 'H') = 0 then
    82    'del' file
     87   '@del' file '1>nul 2>nul'
    8388
    8489/* Set fixed strings */
     
    105110               signal exit_routine
    106111            end
    107 
     112         say 'Processing file:' file
    108113         copyright_year_marker = 'copyright-year'
    109114         copyright_year_marker_len = length(copyright_year_marker)
     
    146151      do
    147152         if translate(file) = copyright_h then
    148             'grep -E "^#define.*COPYRIGHT_YEAR.*' || year || '" ' || file || ' >nul || del ' || file || ' && sed -r -e "/#define.*COPYRIGHT_YEAR/s/[0-9]+/' || year || '/" ' || tmpfile || ' >' file
     153            do
     154               say 'Processing file:' file
     155               'grep -E "^#define.*COPYRIGHT_YEAR.*' || year || '" ' || file || ' >nul || del ' || file || ' && sed -r -e "/#define.*COPYRIGHT_YEAR/s/[0-9]+/' || year || '/" ' || tmpfile || ' >' file
     156            end
    149157         else
    150158            do /* change below to delete and then update version.h only if version is different? */
    151                'del' file
     159               say 'Processing file:' file
     160               '@del' file '1>nul 2>nul'
    152161               'sed -r -e "/#define[ \t]+VERMAJOR/s/(#define[ \t]+VERMAJOR[ \t]+)[^ \t]+/\1' || major || '/g" -e "/#define[ \t]+VERMINOR/s/(#define[ \t]+VERMINOR[ \t]+)[^ \t]+/\1' || minor || '/g" ' || tmpfile || ' >' file
    153162            end
     
    155164   when ext = 'DIZ' then
    156165      do
     166         say 'Processing file:' file
    157167         'sed -r "/FM\/2 v/s/(FM\/2 v)[0-9]+\.[0-9.]+/\1' || ver || '/" ' || tmpfile || ' >' file
    158168      end
    159169   when ext = mkstr_makefile then
    160170      do
     171         say 'Processing file:' file
    161172         'sed -r -e "/desc/s/(SLAInc:).*(\$#@\$#\$#1\$#\$# )[0-9/]+ [0-9:]+/\1' || ver || '\2' || month || '\/' || day || '\/' || year right(major, 2, '0') || ':' || right(minor, 2, '0') || ':' || right(CSDlevel, 2, '0') || '/" ' || tmpfile || ' >' file
    162173      end
    163174   when ext = warpin_makefile then
    164175      do
     176         say 'Processing file:' file
    165177         warpin_db_ver = (major + 0) || '\\' || (minor + 0) || '\\' || (CSDlevel + 0)
    166178         warpin_makefile_ver  = major || '-' || minor || '-' || CSDlevel
  • trunk/ReleaseTool.cmd

    r1292 r1293  
    5050
    5151
    52 globals = 'cmd prompt editor editorcmds killpid tester killtarget version_filelist pager'
     52globals = 'cmd prompt editor editorcmds killpid tester killtarget version_filelist pager prev_action'
    5353
    5454parse arg ver next_ver
     
    7676               action = -1             /* Skip SELECT below */
    7777            end
     78         prev_action = action
    7879      end
    7980   select
     
    8990               end
    9091            signal on Error
     92            prev_action = action
    9193         end
    9294      when action = 1 then
     
    9698            say
    9799            say 'Use the Netlabs FM/2 Developer''s mailing list and wait 24 hours.'
     100            prev_action = action
    98101         end
    99102      when action = 2 then
     
    101104            call NotYet action
    102105            say 'Check for committed work.'
     106            prev_action = action
    103107         end
    104108      when action = 3 then
     
    108112            say 'Online and OK to execute: 'svn_cmd'? (Y/n)'
    109113            if translate(SysGetKey()) \= 'N' then svn_cmd
     114            prev_action = action
    110115         end
    111116      when action = 4 then
     
    118123            say 'Online and OK to execute: 'svn_cmd'? (Y/n)'
    119124            if translate(SysGetKey()) \= 'N' then svn_cmd
     125            prev_action = action
    120126         end
    121127      when action = 5 then
     
    143149            end
    144150            call BuildHobbesTxt(ver)
     151            prev_action = action
    145152         end
    146153      when action = 6 then
     
    148155            'set WARNALL=1'
    149156            'wmake -a all |' pager
     157            prev_action = action
    150158         end
    151159      when action = 7 then
    152       do /* Test built code */
    153           if tester == '' then
    154               do
     160         do /* Test built code */
     161            if tester == '' then
     162               do
    155163                  call NotYet action
    156164                  say 'Test the built code.'
    157               end
    158           else
    159               do  /*kills FM/2 using killpid from FM/2 utils (must be in path) and run cmd to copy files
     165               end
     166             else
     167               do  /*kills FM/2 using killpid from FM/2 utils (must be in path) and run cmd to copy files
    160168                    to test directory and change to that directory must type exit to return here*/
    161169                  killpid killtarget
    162170                  cmd tester
    163               end
     171               end
     172            prev_action = action
    164173         end
    165174      when action = 8 then
    166175         do /* Commit code */
    167176            call CommitifOK
     177            prev_action = action
    168178         end
    169179      when action = 9 then
     
    176186            say 'Online and OK to execute: 'svn_cmd'? (y/N)'
    177187            if translate(SysGetKey()) = 'Y' then svn_cmd
     188            prev_action = action
    178189         end
    179190      when action = 10 then
    180191         do /* Build for the release */
     192            'set WARNALL='
    181193            'set FORTIFY='
    182194            'set DEBUG='
    183195            'wmake -a all'
     196            prev_action = action
    184197         end
    185198      when action = 11 then
     
    202215                  cmd tester
    203216               end
     217            prev_action = action
    204218         end
    205219      when action = 12 then
    206220         do /* Lxlite */
    207221            'wmake lxlite'
     222            prev_action = action
    208223         end
    209224      when action = 13 then
     
    222237                  cmd tester
    223238              end
     239            prev_action = action
    224240         end
    225241      when action = 14 then
     
    227243            call SysCls
    228244            'wmake dist'
     245            prev_action = action
    229246         end
    230247      when action = 15 then
     
    235252            zip_ver = translate(ver, '-', '.')
    236253            'zip -j9 fm2-' || zip_ver || ' warpin\fm2-' || zip_ver || '.wpi'
     254            prev_action = action
    237255         end
    238256      when action = 16 then
     
    240258            call NotYet action
    241259            say 'If FM/2 Utilities have been updated, then zip them up.'
     260            prev_action = action
    242261         end
    243262      when action = 17 then
     
    252271            say
    253272            say '   Update "RBuild" with the new tag: FM2-' || translate(ver, '-', '.')
     273            prev_action = action
    254274         end
    255275      when action = 18 then
     
    270290            say '   (TRAC can move the tickets in bulk when you mark'
    271291            say '   the version milestone complete.)'
     292            prev_action = action
    272293         end
    273294      when action = 19 then
     
    280301            say 'Post a note to "Netlabs Community" <community@netlabs.org>'
    281302            say 'requesting that the release be moved to pub/fm2.'
     303            prev_action = action
    282304         end
    283305      when action = 20 then
     
    289311            end
    290312            call CommitifOK version_filelist
     313            prev_action = action
    291314         end
    292315      otherwise
     
    358381   else
    359382      pager = 'more'
     383   prev_action = 'N/A'
    360384return
    361385
    362 DisplayMenu: procedure
     386DisplayMenu: procedure expose (globals)
    363387   do forever
    364388      call SysCls
    365389      say;say;say
    366       say 'Release Tasks'
     390      say 'Release Tasks' || copies(' ', 35) || 'Previous action:' prev_action
    367391      say
    368392      say '1.  Ensure all work for this release is committed.'
    369393      say '2.  Verify completed tickets are marked closed.'
    370       say '3.  (svn) update local files.'
     394      say '3.  (SVN) Update local files.'
    371395      say '4.  Check (svn) status of local files.'
    372396      say '5.  Edit various files with version #''s and date''s.'
     
    415439GetVer: procedure
    416440   parse arg ver_text
     441ver_retry:
    417442   say
    418443   say 'Please enter the version (x.yy.zz) for' ver_text ':'
    419    parse value linein() with major '.' minor '.' CSDlevel
     444   ver_value = linein()
     445   parse var major '.' minor '.' CSDlevel
    420446   if minor    = '' then
    421447      minor    = 0
    422448   if CSDlevel = '' then
    423449      CSDlevel = 0
     450   if datatype(major) \= 'NUM' | datatype(minor \= 'NUM') | datatype(CSDlevel) \= 'NUM' then
     451      do
     452         say 'Error: Invalid version entered:' ver_value
     453         say;
     454         say 'Try again.'
     455         signal ver_retry
     456      end
     457   /* The following will remove leading zeros */
    424458   major = major + 0
    425459   minor = minor + 0
Note: See TracChangeset for help on using the changeset viewer.