source: orange/install-scripts/createSnapshot.btm @ 10503:1d66e1047f49

Revision 10503:1d66e1047f49, 2.9 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Remove old binary versions.

Line 
1rem # input arguments
2rem # %1 - folder with 3rd party software
3rem # - HG repository is updated to head
4
5call updateSetVariables__.btm snapshot
6set WIN_SNAPSHOT=orange-win-snapshot-hg-%daystr
7set WIN_PYTHON_SNAPSHOT=orange-win-w-python-snapshot-hg-%daystr
8set ADDON_BIOINFORMATICS_SNAPSHOT=orangeAddOn-bioinformatics-snapshot-hg-%daystr
9set ADDON_TEXT_SNAPSHOT=orangeAddOn-text-snapshot-hg-%daystr
10set SOURCE_SNAPSHOT=orange-source-snapshot-hg-%daystr.zip
11
12rem # build core
13cdd %SCRIPTDIR
14call createCommon__.btm snapshot %1 %WIN_SNAPSHOT %WIN_PYTHON_SNAPSHOT
15break_on_error
16
17rem # build add ons
18cdd %SCRIPTDIR
19call createCommonAddOns__.btm snapshot %ADDON_BIOINFORMATICS_SNAPSHOT %ADDON_TEXT_SNAPSHOT
20break_on_error
21
22rem # pack sources
23cdd %TMPDIR
24del /syeqtx sourcestopack
25
26call hg clone . sourcestopack
27
28cd sourcestopack
29
30rem # build source distribution
31e:\Python27\python.exe setup.py sdist
32
33rem # build msi file
34rem # build_msi only handles StrictVersion so we change Orange\version.py
35rem # and remove the .hg dir so the short_version is used
36e:\Python27\python.exe -c"print open('Orange/version.py', 'rb').read().replace('if not release:', 'if not release and False:')" > version.py.1
37move /z version.py.1 Orange\version.py
38del /syeqtx .hg
39
40e:\Python27\python.exe setup.py bdist_msi
41
42break_on_error
43
44rem # if no errors then publish on web (everything at the same time)
45rem # remove any old files 
46rem # leave 10 latest versions.
47e:\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:]]"
48e:\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:]]"
49e:\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:]]"
50e:\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:]]"
51
52e:\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:]]"
53e:\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:]]"
54e:\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:]]"
55
56rem except (%DOWNLOADDIR\orange*-snapshot-%daystr-*.exe) del %DOWNLOADDIR\orange*-snapshot-????-??-??-*.exe
57
58rem # publish
59
60move /z dist\Orange-?.*.zip %DOWNLOADDIR\%SOURCE_SNAPSHOT
61move /z dist\Orange-?.*.msi %DOWNLOADDIR\%WIN_SNAPSHOT.msi
62
63cdd %TMPDIR
64move /z *.exe %DOWNLOADDIR
65if not direxist %DOWNLOADDIR\binaries mkdir %DOWNLOADDIR\binaries
66move /sdz binaries %DOWNLOADDIR\binaries
67
68rem # remember new filenames
69cdd %SCRIPTDIR
70call updateVersionsPy__.btm
Note: See TracBrowser for help on using the repository browser.