Source

orange / install-scripts / createSnapshot.btm

Full commit
rem # input arguments
rem # %1 - folder with 3rd party software
rem # - HG repository is updated to head

call updateSetVariables__.btm snapshot
set WIN_SNAPSHOT=orange-win-snapshot-hg-%daystr
set WIN_PYTHON_SNAPSHOT=orange-win-w-python-snapshot-hg-%daystr
set ADDON_BIOINFORMATICS_SNAPSHOT=orangeAddOn-bioinformatics-snapshot-hg-%daystr
set ADDON_TEXT_SNAPSHOT=orangeAddOn-text-snapshot-hg-%daystr
set SOURCE_SNAPSHOT=orange-source-snapshot-hg-%daystr.zip

rem # build core
cdd %SCRIPTDIR
call createCommon__.btm snapshot %1 %WIN_SNAPSHOT %WIN_PYTHON_SNAPSHOT
break_on_error

rem # build add ons
cdd %SCRIPTDIR
call createCommonAddOns__.btm snapshot %ADDON_BIOINFORMATICS_SNAPSHOT %ADDON_TEXT_SNAPSHOT
break_on_error

rem # pack sources
cdd %TMPDIR
del /syeqtx sourcestopack

call hg clone . sourcestopack

cd sourcestopack

rem # build source distribution
e:\Python27\python.exe setup.py sdist

break_on_error

rem # build msi file (disabled due to StrictVersion requirement for .msi)
rem e:\Python27\python.exe setup.py bdist_msi

break_on_error

rem # if no errors then publish on web (everything at the same time)
rem # remove any old files  
rem # leave 10 latest versions.
e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orange-win-snapshot-hg-*.exe'), reverse=True)[30:]]"
e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orange-win-w-python-snapshot-hg-*.exe'), reverse=True)[30:]]"
e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orangeAddOn-bioinformatics-snapshot-hg-*.exe'), reverse=True)[30:]]"
e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orangeAddOn-text-snapshot-hg-*.exe'), reverse=True)[30:]]"

e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orange-source-snapshot-hg-*.zip'), reverse=True)[10:]]"
e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orange-win-snapshot-hg-*.exe'), reverse=True)[10:]]"
e:\Python27\python.exe -c"import os,glob; [os.remove(f) for f in sorted(glob.glob('%DOWNLOADDIR\orange-win-snapshot-hg-*.msi'), reverse=True)[10:]]"

rem except (%DOWNLOADDIR\orange*-snapshot-%daystr-*.exe) del %DOWNLOADDIR\orange*-snapshot-????-??-??-*.exe

rem # publish

move /z dist\Orange-?.*.zip %DOWNLOADDIR\%SOURCE_SNAPSHOT
move /z dist\Orange-?.*.msi %DOWNLOADDIR\%WIN_SNAPSHOT.msi

cdd %TMPDIR
move /z *.exe %DOWNLOADDIR
if not direxist %DOWNLOADDIR\binaries mkdir %DOWNLOADDIR\binaries
move /sdz binaries %DOWNLOADDIR\binaries

rem # remember new filenames
cdd %SCRIPTDIR
call updateVersionsPy__.btm