K
Kevin
We use a .bat file script to compile from clearcase and
zip up our software everynight. The first thing the
script does is use the DATE commadn to construct a date
tag for the build:
set MYDATE=%DATE%
set MON_NUM=%MYDATE:~4,2%
set DAY_NUM=%MYDATE:~7,2%
set YEAR=%MYDATE:~10,4%
for /f "tokens=%MON_NUM%" %%a in (
"JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC") do
set MON_NAME=%%a
set t=DEV_%YEAR%%MON_NAME%%DAY_NUM%
Just recently we found the builds being named WITHOUT the
month in them. After some investigation I determined that
the "for" line was failing when the MON_NUM was either 08
or 09... it works for every other one though.
I put in this hack:
IF "%MON_NUM%"=="08" SET MON_NUM=8
IF "%MON_NUM%"=="09" SET MON_NUM=9
which works around the problem. Apparently, it has no
problem with just 8 and 9 only with 08 and 09.
I was hoping to gain some insight into this strange
quirk... any info would be greatly appreciated.
zip up our software everynight. The first thing the
script does is use the DATE commadn to construct a date
tag for the build:
set MYDATE=%DATE%
set MON_NUM=%MYDATE:~4,2%
set DAY_NUM=%MYDATE:~7,2%
set YEAR=%MYDATE:~10,4%
for /f "tokens=%MON_NUM%" %%a in (
"JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC") do
set MON_NAME=%%a
set t=DEV_%YEAR%%MON_NAME%%DAY_NUM%
Just recently we found the builds being named WITHOUT the
month in them. After some investigation I determined that
the "for" line was failing when the MON_NUM was either 08
or 09... it works for every other one though.
I put in this hack:
IF "%MON_NUM%"=="08" SET MON_NUM=8
IF "%MON_NUM%"=="09" SET MON_NUM=9
which works around the problem. Apparently, it has no
problem with just 8 and 9 only with 08 and 09.
I was hoping to gain some insight into this strange
quirk... any info would be greatly appreciated.