Changeset 1542
- Timestamp:
- Jul 11, 2010, 1:54:17 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ReleaseTool.cfg (modified) (1 diff)
-
ReleaseTool.cmd (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ReleaseTool.cfg
r1541 r1542 112 112 Password = 113 113 114 [SMTP] 115 Command = g:\pmmail\bin\pmmsend -a G:\PMMail\Accounts\ygk_us0.act -t "%%TO%%" -s "%%SUBJECT%%" -m %%MESSAGE_BODY_FILE%% -
trunk/ReleaseTool.cmd
r1541 r1542 53 53 * 31 May 10 JBS Build zip file and Hobbes txt file in Warpin directory 54 54 * 55 * To Do 56 * - Improve support for external CMD files which perform some or all of a task 57 * - Support sending email via PMMSend? 58 * - Support sending email via REXXMail? 55 59 */ 56 60 … … 67 71 */ 68 72 69 globals = 'cfg. ver. mainmenu. cmd. Hobbes. loaded. prev_user_choice'73 globals = 'cfg. ver. mainmenu. cmd. Hobbes. available. prev_user_choice' 70 74 71 75 parse arg args … … 164 168 prev_user_choice = user_choice 165 169 end 170 when user_choice = 'S' then 171 do /* Open a command line */ 172 dirsave = directory() 173 svndrive = filespec('D', cmd.smartsvn) 174 svndrive_dirsave = directory(svndrive) 175 call directory strip(svndrive || filespec('P', cmd.smartsvn), 'T', '\') 176 call ExecCmd 'call smartsvn.cmd' 177 call directory svndrive_dirsave 178 call directory dirsave 179 say;say 180 say 'If SmartSVN did not run correctly, make sure the default Java' 181 say 'is Java 1.4.1 or later before running ReleaseTool.' 182 prev_user_choice = user_choice 183 end 166 184 when user_choice = mainmenu.Ensure_work_done_num then 167 185 do /* Ensure all work (by others) is comitted */ 168 call NotYet user_choice 169 say 'Notify programmers to commit their work for this release.' 170 say 171 say 'Use the Netlabs FM/2 Developer''s mailing list and wait 24 hours.' 186 if cfg.SMTP.1.Command = '' then 187 do 188 say 189 say 'A "send-email" command was not found in' cfg.filename || '.' 190 say 'So this will have to be done manually.' 191 say 192 say 'Notify programmers to commit their work for this release.' 193 say 194 say 'Use the Netlabs FM/2 Developer''s mailing list and wait 24 hours.' 195 end 196 else 197 do 198 say 199 say 'Sending a noptification email to FM/2 developers...' 200 say 201 say 'Proposed subject:' 202 subj = 'Commit work for FM/2' ver.full 203 say ' ' || subj 204 say 205 say 'If this subject is acceptable, just press Enter. Otherwise' 206 say 'type in the desired subject for the notification email:' 207 response = strip(linein()) 208 if response \= '' then 209 subj = response 210 SMTPBody_file = SysTempFilename('SMTPBody.???') 211 call lineout SMTPBody_file, 'The release of FM/2' ver.full 'is imminent.' 212 call lineout SMTPBody_file, '' 213 call lineout SMTPBody_file, 'Please commit all work for this release within 24 hours.' 214 call lineout SMTPBody_file, '' 215 call lineout SMTPBody_file, 'Reply to this email if there are reasons to delay the release.' 216 call stream SMTPBody_file, 'c', 'close' 217 say 218 say 'The proposed body of the notification email will now be loaded into an editor.' 219 say 'Make desired changes, if any, and save the file.' 220 say 221 call charout, 'Press any key when ready to load the message body into an editor: ' 222 call SysGetKey 223 say 224 call ExecCmd cmd.editor SMTPBody_file 225 call SendSMTP 'TO=fm2-dev@netlabs.org <fm2-dev@netlabs.org>', , 226 'SUBJ=' || subj, , 227 'BODYFILE=' || SMTPBody_file 228 call SysFileDelete SMTPBody_file 229 end 172 230 prev_user_choice = user_choice 173 231 end … … 188 246 when user_choice = mainmenu.Check_SVN_status_num then 189 247 do /* Ensure all local source is up to date */ 190 if right(translate(cmd.processor), 8) = '4OS2.EXE'then248 if cmd.processor_is_4os2 = 1 then 191 249 svn_cmd = 'svn status -v |&' cmd.pager 192 250 else … … 222 280 when user_choice = mainmenu.WARNALL_build_num then 223 281 do /* Ensure the edits build */ 282 say 224 283 'set WARNALL=1' 225 284 call ExecCmd 'wmake -a all | tee warnall.log |' cmd.pager … … 227 286 call ExecCmd 'diff.exe -rub warnall.base warnall.log > warnall.diff' 228 287 call ExecCmd cmd.editor 'warnall.diff' 288 say 289 call charout , 'Make WARNALL.LOG the new WARNALL.BASE? (y/N): ' 290 if translate(SysGetKey()) = 'Y' then 291 'copy WARNALL.LOG WARNALL.BASE' 292 say 229 293 prev_user_choice = user_choice 230 294 end … … 334 398 when user_choice = mainmenu.Announce_num then 335 399 do /* Announce the release. */ 336 if loaded.RXSOCK = 1 then400 if available.RXSOCK = 1 then 337 401 call AnnounceToNewsgroups 338 402 else … … 361 425 '@pause' 362 426 end 427 if available.tee = 0 then 428 call SysFileDelete 'tee.cmd' 363 429 end 364 430 … … 374 440 call RxFuncAdd "SockLoadFuncs", "RXSOCK", "SockLoadFuncs" 375 441 call SockLoadFuncs 0 376 loaded.RXSOCK = 1442 available.RXSOCK = 1 377 443 378 444 /* … … 386 452 rcx = 1 387 453 if rcx = 1 then 388 loaded.RXSOCK = 1454 available.RXSOCK = 1 389 455 else 390 456 do 391 loaded.RXSOCK = 0457 available.RXSOCK = 0 392 458 call RxFuncDrop "SockLoadFuncs", "RXSOCK", "SockLoadFuncs" 393 459 say … … 408 474 signal on syntax name Error 409 475 if rcx = 1 then 410 loaded.RXFTP = 1476 available.RXFTP = 1 411 477 else 412 478 do 413 loaded.RXFTP = 0479 available.RXFTP = 0 414 480 say 415 481 say 'RXFTP.DLL load failed.' … … 445 511 cmd. = '' 446 512 cmd.processor = value('COMSPEC',,'OS2ENVIRONMENT') 513 cmd.processor_is_4os2 = Is4OS2() 514 if cmd.processor_is_4os2 = 1 then 515 available.tee = 1 516 else 517 do 518 if SysSearchPath('PATH', 'tee.exe') \= '' then 519 available.tee = 1 520 else 521 do 522 available.tee = 0 523 call SysFileDelete 'tee.cmd' 524 call lineout 'tee.cmd', '/* */' 525 call lineout 'tee.cmd', 'parse arg filename' 526 call lineout 'tee.cmd', 'call SysFileDelete filename' 527 call lineout 'tee.cmd', 'do while lines() > 0' 528 call lineout 'tee.cmd', ' parse pull line' 529 call lineout 'tee.cmd', ' call lineout filename, line' 530 call lineout 'tee.cmd', ' say line' 531 call lineout 'tee.cmd', 'end' 532 call lineout 'tee.cmd', "call stream filename, 'c', 'close'" 533 call stream 'tee.cmd', 'c', 'close' 534 end 535 end 447 536 userprompt = value('PROMPT',,'OS2ENVIRONMENT') 448 537 parse var userprompt . '$e[' colorset 'm' . … … 474 563 end 475 564 565 cmd.smartsvn = SysSearchPath('PATH', 'smartsvn.cmd') 476 566 cmd.tester = value('SVN_TESTER',,'OS2ENVIRONMENT') 477 cmd.killpid = value('SVN_KILL',,'OS2ENVIRONMENT')478 if cmd.killpid = ='' then479 cmd.killpid = 'killpid'480 cmd.killtarget = 'FM/2'567 cmd.killpid = value('SVN_KILL',,'OS2ENVIRONMENT') 568 if cmd.killpid = '' then 569 cmd.killpid = 'killpid' 570 cmd.killtarget = 'FM/2' 481 571 482 572 m = 0 … … 588 678 cfg.FTP.keys = 'DESCRIPTIVE_HOSTNAME HOST USERID PASSWORD DIRECTORY FILE' 589 679 cfg.NNTP.keys = 'NEWSGROUPS HOST USERID PASSWORD' 590 cfg.SMTP.keys = ' '680 cfg.SMTP.keys = 'COMMAND' 591 681 592 682 cfg.NNTP.closing = cfg.crlf || cfg.crlf || '.' || cfg.crlf … … 675 765 end 676 766 say 677 call charout , 'N)ext C)ommandline Q)uit or mennu item number: ' 767 call charout , 'N)ext C)ommandline ' 768 if cmd.smartsvn \= '' then 769 call charout , 'S)martSVN ' 770 call charout , 'Q)uit or mennu item number: ' 678 771 user_choice = translate(translate(SysGetKey()), 'N', '0d'x) 679 if user_choice = 'N' | user_choice = 'C' | user_choice = 'Q' then 772 if user_choice = 'N' | , 773 user_choice = 'C' | , 774 user_choice = 'Q' | , 775 (cmd.smartsvn \= '' & user_choice = 'S') then 680 776 leave 681 777 if datatype(user_choice) = 'NUM' then … … 689 785 end 690 786 end 787 say 691 788 if user_choice = 'N' then 692 789 if prev_user_choice = 'N/A' then … … 804 901 Commandline: procedure expose (globals) 805 902 signal off Error 806 if right(translate(cmd.processor), 8) = '4OS2.EXE'then903 if cmd.processor_is_4os2 = 1 then 807 904 '@' || cmd.processor "prompt" cmd.prompt 808 905 else … … 817 914 signal on Error 818 915 return 916 917 /*=== Is4OS2() Return true if 4OS2 running ===*/ 918 Is4OS2: procedure 919 call setlocal 920 '@set X=%@eval[0]' 921 yes = value('X',, 'OS2ENVIRONMENT') = 0 922 call endlocal 923 return yes /* if running under 4OS2 */ 819 924 820 925 RunTester: procedure expose (globals) … … 1078 1183 say ' ' tmpzipfile 1079 1184 say 'as an attachment. In the text of the message, please describe' 1080 say 'the errors you detected in detail. Thank you.' 1185 say 'the errors you detected in detail. After the email has been sent' 1186 say 'you may delete:' 1187 say ' ' tmpzipfile 1081 1188 say 1082 1189 'pause' … … 1091 1198 1092 1199 UploadRelease: procedure expose (globals) 1093 if loaded.RXFTP = 0 then1200 if available.RXFTP = 0 then 1094 1201 do 1095 1202 say 'Until RXFTP.DLL is placed in a directory on the LIBPATH,' … … 1577 1684 return 1578 1685 1686 SendSMTP: procedure expose (globals) 1687 email_command = cfg.SMTP.1.Command 1688 do i = 1 to arg() 1689 parse value arg(i) with key '=' key_value 1690 key = translate(key) 1691 select 1692 when (key = 'TO' & pos('%%TO%%', email_command) > 0) then 1693 do 1694 parse var email_command part1 '%%TO%%' part2 1695 email_command = part1 || key_value || part2 1696 end 1697 when (key = 'SUBJ' & pos('%%SUBJECT%%', email_command) > 0) then 1698 do 1699 parse var email_command part1 '%%SUBJECT%%' part2 1700 /* JBS: Test code */ 1701 email_command = part1 || '[TEST message. Ignore] ' || key_value || part2 1702 /* 1703 email_command = part1 || key_value || part2 1704 */ 1705 end 1706 when (key = 'BODYFILE' & pos('%%MESSAGE_BODY_FILE%%', email_command) > 0) then 1707 do 1708 parse var email_command part1 '%%MESSAGE_BODY_FILE%%' part2 1709 email_command = part1 || stream(key_value, 'c', 'query exists') || part2 1710 end 1711 otherwise 1712 say 'Program error: Unknown param: "' || arg(i) || '" for SendSMTP function.' 1713 end 1714 end 1715 /* JBS: Test code */ 1716 say 1717 say 'While the new email code is being tested and debugged:' 1718 say '1) All subjects will be prefaced by: "[TEST message. Ignore]"' 1719 say '2) A "preview" of the pending email command will be displayed.' 1720 say 1721 say 'If the email command is unsuccessful, please copy and paste it and' 1722 say 'post it, along with a description of the error(s) and, if possible,' 1723 say 'a proposed correction to the fm2-dev mailiing list.' 1724 say 1725 say 'The pending email command:' 1726 say ' ' email_command 1727 say 1728 call charout , 'Press any key when ready to execute this command...' 1729 call SysGetKey 1730 say;say 1731 call ExecCmd email_command 1732 return 1733 1579 1734 /*** Usage/Error routines ***/ 1580 1735 … … 1644 1799 return 1645 1800 1646 Log_Error: procedure expose cfg.1647 return1648
Note:
See TracChangeset
for help on using the changeset viewer.
