Changeset 8788 for trunk/tools


Ignore:
Timestamp:
Jun 27, 2002, 12:11:57 AM (23 years ago)
Author:
bird
Message:

Made it possible to specify build type and date. (fixes cross midnight builds)

Location:
trunk/tools/DailyBuild
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/DailyBuild/job.cmd

    r6125 r8788  
    1 /* $Id: job.cmd,v 1.7 2001-06-27 08:34:43 bird Exp $
     1/* $Id: job.cmd,v 1.8 2002-06-26 22:06:57 bird Exp $
    22 *
    33 * Main job for building OS/2.
    44 *
    5  * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     5 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
     
    1414
    1515    /*
     16     * Get and set the build date.
     17     */
     18    parse arg sDate sType sDummy
     19    fOk = 1;
     20    if (sDate <> '') then
     21    do
     22        parse var sDate sYear'-'sMonth'-'sDay
     23        sType = substr(translate(sType), 1, 1);
     24        if (  (length(sYear) <> 4) | (strip(translate(sYear, '','0123456789')) <> ''),
     25            | (length(sMonth) <>2) | (strip(translate(sMonth, '','0123456789')) <> ''),
     26            | (length(sDay)  <> 2) | (strip(translate(sDay, '','0123456789')) <> ''),
     27            | ((sType <> 'W') & (sType <> 'D'))) then
     28            fOk = 0;
     29        else
     30            sDate = sYear||sMonth||sDay;
     31    end
     32    else
     33    do
     34        sDate = date('S');
     35        sType = 'D';
     36        if (Date('B')//7 = 3) then  /* weekly on Thursdays */
     37            sType = 'W';
     38    end
     39
     40    if (\fOk) then
     41    do
     42        say 'Hey mister! you''ve given me a bad date or build type!!!';
     43        say 'Date='sYear'-'sMonth'-'sDay
     44        say 'Buildtype='sType;
     45        exit(16);
     46    end
     47    call value 'BUILD_DATE', sDate, 'OS2ENVIRONMENT';
     48    call value 'BUILD_TYPE', sType, 'OS2ENVIRONMENT';
     49
     50
     51    /*
    1652     * Get source directory of this script
    1753     */
    1854    parse source sd1 sd2 sScript
    1955    sScriptDir = filespec('drive', sScript) || filespec('path', sScript);
    20     sLogFile = sScriptDir || '\logs\' || Date('S') || '.log';
    21     sTree    = sScriptDir || '..\tree' || Date('S');
     56    sLogFile = sScriptDir || '\logs\' || sDate || '.log';
     57    sTree    = sScriptDir || '..\tree' || sDate;
    2258
    2359    /*
     
    5894     * Update local installation at d:\odin...
    5995     */
     96/*
    6097    'd:';
    6198    if (rc <> 0) then call failure rc, 'd: failed.';
     
    66103    'd:'
    67104    if (rc <> 0) then call failure rc, 'd: failed.';
    68 
     105*/
    69106    /* successfull exit */
    70107    exit(0);
  • trunk/tools/DailyBuild/odin32bldnr.cmd

    r4993 r8788  
    1 /* $Id: odin32bldnr.cmd,v 1.4 2001-01-20 18:22:47 bird Exp $
     1/* $Id: odin32bldnr.cmd,v 1.5 2002-06-26 22:07:15 bird Exp $
    22 *
    33 * Build number update script.
     
    99 * Assumes that current directory is the root.
    1010 *
    11  * Copyright (c) 2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     11 * Copyright (c) 2001-2002 knut st. osmundsen (bird@anduin.net)
    1212 *
    1313 * Project Odin Software License can be found in LICENSE.TXT
     
    1717call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
    1818call SysLoadFuncs;
     19
     20/* get build settings */
     21sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     22sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     23if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
    1924
    2025
     
    8489     * Commit the build nr. file.
    8590     */
    86     'cvs commit -m "Daily build - 'Date('S')'" odinbuild.h';
     91    if (sType = 'W') then
     92        'cvs commit -m "Weekly build - 'sDate'" odinbuild.h';
     93    else
     94        'cvs commit -m "Daily build - 'sDate'" odinbuild.h';
    8795    if (rc <> 0) then call failed rc, 'failed to commit odinbuild.h'
    8896end
  • trunk/tools/DailyBuild/odin32build.cmd

    r3451 r8788  
    1 /* $Id: odin32build.cmd,v 1.1 2000-04-27 11:32:24 bird Exp $
     1/* $Id: odin32build.cmd,v 1.2 2002-06-26 22:08:32 bird Exp $
    22 *
    33 * Builds debug and release editions of Odin32.
     
    88 *
    99 */
     10    /* get build settings */
     11    /*sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     12    sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     13    if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     14    */
     15
    1016    /* debug build */
    1117    'SET DEBUG=1';
  • trunk/tools/DailyBuild/odin32clean.cmd

    r4193 r8788  
    1 /* $Id: odin32clean.cmd,v 1.2 2000-09-05 17:36:22 bird Exp $
     1/* $Id: odin32clean.cmd,v 1.3 2002-06-26 22:09:17 bird Exp $
    22 *
    33 * Removes trees. WARNING!!!!! All tree<date> directories are removed
     
    66 * (Delpath is a "deltree" clone I've made, use your own.)
    77 *
    8  * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     8 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    99 *
    1010 * Project Odin Software License can be found in LICENSE.TXT
     
    1212 */
    1313
     14    /* get build settings */
     15    sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     16    sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     17    if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     18
    1419    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
    1520    call SysloadFuncs;
    1621
    17     sTree    = 'tree' || Date(S);
     22    sTree    = 'tree' || sDate;
    1823
    1924    /*
    2025     * We assume currentdirectory is the current tree.
    2126     */
    22     rc = SysFileTree('..\tree'||substr(Date('S'),1,4)||'*.', 'asTrees', 'DO');
     27    rc = SysFileTree('..\tree'||substr(sDate,1,4)||'*.', 'asTrees', 'DO');
    2328    if (rc = 0) then
    2429    do
     
    3136        end
    3237    end
     38exit(0);
    3339
    34     exit(0);
    3540
    3641failure: procedure
    3742parse arg rc, sText;
    3843    say 'rc='rc sText
    39     exit(rc);
     44exit(rc);
    4045
  • trunk/tools/DailyBuild/odin32db.cmd

    r8022 r8788  
    1 /* $Id: odin32db.cmd,v 1.6 2002-02-26 17:25:37 bird Exp $
     1/* $Id: odin32db.cmd,v 1.7 2002-06-26 22:09:59 bird Exp $
    22 *
    33 * Updates the Odin32 API database.
    44 *
    5  * Copyright (c) 1999-2002 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     5 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
    88 *
    99 */
     10    /* get build settings */
     11    sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     12    sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     13    if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     14
     15
    1016    /* load rexxutils functions and Ftp Utils. */
    1117    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
     
    3743    if rc <> 0 then call failure rc, 'cd <> failed';
    3844    'mysqladmin refresh';
    39     'rar a -m5 ' || sScriptDir || 'dbbackup\db'||date(S)||'.rar *'
     45    'rar a -m5 ' || sScriptDir || 'dbbackup\db'||sDate||'.rar *'
    4046    if rc <> 0 then call failure rc, 'rar db failed';
    4147    'cd \';
     
    7379parse arg rc, sText;
    7480    say 'rc='rc sText
    75     exit(rc);
     81exit(rc);
    7682
    7783failure2: procedure
    7884parse arg rc, sText;
    7985    say 'rc='rc sText
    80     return 0;
     86return 0;
    8187
    8288
     
    110116    if (sDataDir = '') then
    111117        sDataDir = 'd:\knut\Apps\MySql\data\';
    112     return sDataDir;
     118return sDataDir;
    113119
    114120/*
     
    167173    end
    168174    call stream sPasswd, 'c', 'close';
    169     return sRet;
     175return sRet;
    170176
    171177
     
    218224    else
    219225        rc = 0;
    220     return 0;
    221 
    222 
     226return 0;
     227
     228
  • trunk/tools/DailyBuild/odin32dbupl.cmd

    r7840 r8788  
    1 /* $Id: odin32dbupl.cmd,v 1.1 2002-02-08 10:56:02 bird Exp $
     1/* $Id: odin32dbupl.cmd,v 1.2 2002-06-26 22:10:23 bird Exp $
    22 *
    33 * Updates the Odin32 API database.
    44 *
    5  * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     5 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
    88 *
    99 */
     10
     11    /* get build settings */
     12    sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     13    sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     14    if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     15
    1016    /* load rexxutils functions */
    1117    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
  • trunk/tools/DailyBuild/odin32ftp.cmd

    r4919 r8788  
    1 /* $Id: odin32ftp.cmd,v 1.2 2001-01-10 14:17:23 bird Exp $
     1/* $Id: odin32ftp.cmd,v 1.3 2002-06-26 22:10:45 bird Exp $
    22 *
    33 * Old FTP routines using only RexxFTP.
    44 *
    5  * Copyright (c) 1999-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     5 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
     
    99 */
    1010/*Trace 'A'*/
     11
     12/* get build settings */
     13sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     14sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     15if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     16
    1117
    1218rc = RxFuncAdd('FtpLoadFuncs','rxFtp','FtpLoadFuncs');
     
    1622
    1723do i = 1 to 7
    18     sFile   = 'odin32bin-'|| DATE(S);
    19     sDelete = 'odin32bin-'|| DateSub(DATE('S'), 7);
     24    sFile   = 'odin32bin-'|| sDate;
     25    sDelete = 'odin32bin-'|| DateSub(sDate, 7);
    2026    sFileDbg   = sFile   || '-debug.zip';
    2127    sDeleteDbg = sDelete || '-debug.zip';
     
    7076        do
    7177            rc = 0;
    72             if (DATE('B')//7 <> 5) then
     78            if (sType <> 'D') then
    7379                rc = FtpDelete(sFileRemote);
    7480            rcPut = FtpPut(sFile, sFileRemote, 'Binary');
     
    103109    say 'rc='rc sText
    104110    say 'FTPerrno:'||iftperrno
    105     return;
     111return;
    106112
    107113
     
    152158    end
    153159    call stream sPasswd, 'c', 'close';
    154     return sRet;
     160return sRet;
    155161
    156162
     
    196202            sDate = sDate - iDayInMonth - 8869;   /* last day of last year */
    197203    end
    198 
    199     return sDate;
     204return sDate;
     205
    200206
    201207/*
     
    222228            cDays = 31;
    223229    end /* select */
    224     return cDays;
    225 
    226 
     230return cDays;
     231
     232
  • trunk/tools/DailyBuild/odin32ftp2.cmd

    r7230 r8788  
    1 /* $Id: odin32ftp2.cmd,v 1.18 2001-10-26 22:19:29 bird Exp $
     1/* $Id: odin32ftp2.cmd,v 1.19 2002-06-26 22:11:28 bird Exp $
    22 *
    33 * Uploads the relase and debug builds to the FTP sites.
    44 *
    5  * Copyright (c) 1999-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     5 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
     
    99 */
    1010/*Trace 'A'*/
     11
     12/* get build settings */
     13sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     14sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     15if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     16
    1117
    1218rc = RxFuncAdd('FtpLoadFuncs','rxFtp','FtpLoadFuncs');
     
    1824 * Determin files to upload and files to delete.
    1925 */
    20 if (DATE('B')//7 = 3) then              /* Thursdays only! */
     26if (sType = 'W') then
    2127do  /* weekly .wpi build */
    2228    asUploads.0 = 3;
    2329    asUploads.1 = 'ChangeLog';
    24     asUploads.2 = 'odin32bin-'DATE('S')'-release.wpi';
    25     asUploads.3 = 'odin32bin-'DATE('S')'-debug.wpi';
     30    asUploads.2 = 'odin32bin-'sDate'-release.wpi';
     31    asUploads.3 = 'odin32bin-'sDate'-debug.wpi';
    2632    sDirectory  = 'weekly';
    2733end
     
    3036    asUploads.0 = 3;
    3137    asUploads.1 = 'ChangeLog';
    32     asUploads.2 = 'odin32bin-'DATE('S')'-release.zip';
    33     asUploads.3 = 'odin32bin-'DATE('S')'-debug.zip';
     38    asUploads.2 = 'odin32bin-'sDate'-release.zip';
     39    asUploads.3 = 'odin32bin-'sDate'-debug.zip';
    3440    sDirectory  = 'daily';
    3541end
     
    3844do i = 1 to 12
    3945    j = i * 2;
    40     asDelete.j = 'odin32bin-'DateSub(Date('S'), 31+i)'-release.zip';
     46    asDelete.j = 'odin32bin-'DateSub(sDate, 31+i)'-release.zip';
    4147    j = j + 1;
    42     asDelete.j = 'odin32bin-'DateSub(Date('S'), 31+i)'-debug.zip';
     48    asDelete.j = 'odin32bin-'DateSub(sDate, 31+i)'-debug.zip';
    4349end
    4450
     
    105111        'echo ok >' sLockFile
    106112    end
    107 
    108     return 0;
     113return 0;
     114
    109115
    110116
     
    128134        'echo ok >' sLockFile
    129135    end
    130 
    131     return 0;
     136return 0;
     137
    132138
    133139
     
    162168        'echo ok >' sLockFile;
    163169    end
    164 
    165     return 0;
     170return 0;
    166171
    167172
     
    210215    else
    211216        rc = 0;
    212 
    213     return 0;
     217return 0;
     218
    214219
    215220
     
    263268    else
    264269        rc = 0;
    265 
    266     return rc;
     270return rc;
     271
    267272
    268273
     
    315320    else
    316321        rc = 0;
    317     return 0;
     322return 0;
     323
    318324
    319325/*
     
    324330    say 'rc='rc sText
    325331    say 'FTPerrno:'||iftperrno
    326     return;
     332return;
    327333
    328334
     
    370376    end
    371377    call stream sPasswd, 'c', 'close';
    372     return sRet;
    373 
    374 
    375 testdatesub:
     378return sRet;
     379
     380
     381testdatesub: procedure
    376382    sDate='20010131';
    377383
     
    379385        say sDate '-' i '=' DateSub(sDate, i);
    380386    end
    381     exit;
     387exit;
    382388
    383389
     
    423429            sDate = sDate - iDayInMonth - 8869;   /* last day of last year */
    424430    end
    425 
    426     return sDate;
     431return sDate;
     432
    427433
    428434/*
     
    449455            cDays = 31;
    450456    end /* select */
    451     return cDays;
    452 
     457return cDays;
     458
  • trunk/tools/DailyBuild/odin32get.cmd

    r3842 r8788  
    1 /* $Id: odin32get.cmd,v 1.2 2000-07-18 11:18:14 bird Exp $
     1/* $Id: odin32get.cmd,v 1.3 2002-06-26 22:11:43 bird Exp $
    22 *
    33 * Gets the CVS tree from netlabs.
    44 *
    5  * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     5 * Copyright (c) 1999-2002 knut st. osmundsen (bird@anduin.net)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
    88 *
    99 */
     10
     11    /* get build settings */
     12    /*
     13    sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     14    sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     15    if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     16    */
    1017
    1118    'cvs checkout .'
  • trunk/tools/DailyBuild/odin32pack.cmd

    r7730 r8788  
    1 /* $Id: odin32pack.cmd,v 1.22 2002-01-06 16:53:23 bird Exp $
     1/* $Id: odin32pack.cmd,v 1.23 2002-06-26 22:11:57 bird Exp $
    22 *
    33 * Make the two zip files.
     
    1111 */
    1212    sStartDir = directory();
    13 
    14     if (DATE('B')//7 = 3) then  /* weekly on Thursdays */
    15         sType = '-Weekly';
     13    sDate = value('BUILD_DATE',, 'OS2ENVIRONMENT');
     14    sType = value('BUILD_TYPE',, 'OS2ENVIRONMENT');
     15    if ((sDate = '') | (sType = '')) then do say 'BUILD_DATE/BUILD_TYPE unset, you didn''t start job.cmd.'; exit(16); end
     16
     17    if (sType = 'W') then
     18        sTypeOdinCMD = '-Weekly';
    1619    else
    17         sType = '-Daily';
     20        sTypeOdinCMD = '-Daily';
     21
    1822
    1923    /*
     
    2125     */
    2226    call ChDir 'tools\install';
    23     'call odin.cmd 'sType' debug'
     27    'call odin.cmd 'sTypeOdinCMD' debug'
    2428    if (RC <> 0) then call failure rc, 'odin.cmd debug failed.';
    25     'call odin.cmd 'sType' release'
     29    'call odin.cmd 'sTypeOdinCMD' release'
    2630    if (RC <> 0) then call failure rc, 'odin.cmd release failed.';
    2731    'move *.wpi' sStartDir;
     
    4044     * Make copy.
    4145     */
    42     if (DATE('B')//7 = 3) then
     46    if (sType = 'W') then
    4347        'copy *.wpi e:\DailyBuildArchive\'
    4448    else
     
    4953
    5054
    51 packdir: procedure expose sStartDir;
    52 parse arg sDir, sType;
    53 
    54     sZipFile = directory() || '\odin32bin-' || DATE(S) || '-' || sType || '.zip';
     55packdir: procedure expose sStartDir sDate sType;
     56parse arg sDir, sBldType;
     57
     58    sZipFile = directory() || '\odin32bin-' || sDate || '-' || sBldType || '.zip';
    5559
    5660    /*
     
    101105    do
    102106        rc2 = rc;
    103         call backout sDir, sType, sRoot;
     107        call backout sDir, sBldType, sRoot;
    104108        call failure rc2, 'renaming system32\glide -> ..\glide_tmp failed';
    105109    end
     
    107111    call copy sRoot'\bin\wgss50.dll', 'system32\wgss50.dll';
    108112    /*call copy sRoot'\bin\odin.ini', 'system32\Odin.ini';*/
    109     if (pos('debug', sType) > 0) then
     113    if (pos('debug', sBldType) > 0) then
    110114    do
    111115        call copy sRoot'\bin\release\odincrt.dll', 'system32\odincrt.dll'
     
    118122    do
    119123        rc2 = rc;
    120         call backout sDir, sType, sRoot;
     124        call backout sDir, sBldType, sRoot;
    121125        call failure rc2, 'zip...';
    122126    end
    123127
    124128    /* resotre */
    125     call backout sDir, sType, sRoot;
     129    call backout sDir, sBldType, sRoot;
    126130
    127131    /* restore directory */
     
    131135/* backout procedure for packdir */
    132136backout: procedure;
    133     parse arg sDir, sType, sRoot
    134     if (pos('debug', sType) > 0) then
     137    parse arg sDir, sBldType, sRoot
     138    if (pos('debug', sBldType) > 0) then
    135139    do
    136140        'del system32\odincrt.dll'
     
    144148 * Pack the 3dx dlls.
    145149 */
    146 packdir3dx: procedure expose sStartDir;
    147 parse arg sDir, sType;
    148     sZipFile = directory()||'\odin32bin-' || DATE(S) || '-' || sType || '.zip';
     150packdir3dx: procedure expose sStartDir sDate sType;
     151parse arg sDir, sBldType;
     152    sZipFile = directory()||'\odin32bin-' || sDate || '-' || sBldType || '.zip';
    149153
    150154    sRoot = directory();
Note: See TracChangeset for help on using the changeset viewer.