Commits

Aleš Erjavec committed 03f0789

Upload the built snapshots and logs using sftp.

  • Participants
  • Parent commits 6266629

Comments (0)

Files changed (9)

install-scripts/callCreateSnapshot.btm

+rem # Required env variables:
+rem #    PUBLISH_URL - url (user@host) of the publish server
+rem #    ID_KEY - identity key file for logging into publish server
+
 @echo off
 set QTVER=qt44-3rdparty
 call createSnapshot.btm %QTVER >& win-snapshot-create.%QTVER.log
 sendmail %MAIL_TO %subj @%SCRIPTDIR\win-snapshot-create.%QTVER.log
 
 rem # copy log(s) to web in any case (success or error)
-set BUILDLOGDIR=%DOWNLOADDIR\buildLogs\winxp
-if not direxist %BUILDLOGDIR mkdir /s %BUILDLOGDIR
-del /eq %BUILDLOGDIR\win-snapshot-*.log
-move /z %SCRIPTDIR\win-snapshot-create.%QTVER.log %BUILDLOGDIR
-move /z %TMPDIR\win-snapshot*.log %BUILDLOGDIR
+rem # create a ftp script for moving the logs
+
+echo cd files/buildLogs/winxp > move.scr
+echo put %SCRIPTDIR%\win-snapshot-create.%QTVER%.log >> move.scr
+echo exit >> move.scr
+
+psftp -i "%ID_KEY%" "%PUBLISH_URL%" -batch -b move.scr

install-scripts/createCommonAddOns__.btm

   set PYTHON=%PYTHONBASE%%pyver
   %PYTHON\python setup.py build -c mingw32 bdist_wininst > %COMPILELOG
   break_on_error
-rem when compiled:  move /z %TMPDIR\Bioinformatics\dist\*.win32-py%npver.exe %TMPDIR\%PKG_BIOINFORMATICS-py%npver.exe
-  move /z %TMPDIR\Bioinformatics\dist\*.win32.exe %TMPDIR\%PKG_BIOINFORMATICS-py%npver.exe
+  move /z dist\*.win32.exe %TMPDIR\%PKG_BIOINFORMATICS-py%npver.exe
 
-  REM # publish, add record to stamps_pyd.txt, needed for update from web (accessed by updateFromSVN.bat)  
-  set TMPBINDIR=%TMPDIR\binaries\%pyver\add-ons\Bioinformatics
-  if not direxist %TMPBINDIR mkdir /s %TMPBINDIR
-  
-  cdd %TMPDIR\Bioinformatics\build\lib.win32-%npver
-  for %pydf in (*.pyd) do (
-    copy %pydf %TMPBINDIR
-    set MD5=%@MD5[%pydf]
-    echo add-ons\Bioinformatics\%pydf %MD5 >> %TMPDIR\binaries\%pyver\stamps_pyd.txt
-  )
 )
 
 for %pyver in (%PYTHONVERSIONS_ADDONs) do (
   set PYTHON=%PYTHONBASE%%pyver
   %PYTHON\python setup.py build -c mingw32 bdist_wininst > %COMPILELOG
   rem break_on_error
-  move /z %TMPDIR\Text\dist\*.win32-py%npver.exe %TMPDIR\%PKG_TEXT-py%npver.exe
-
-  REM # publish, add record to stamps_pyd.txt, needed for update from web (accessed by updateFromSVN.bat)  
-  set TMPBINDIR=%TMPDIR\binaries\%pyver\add-ons\Text
-  if not direxist %TMPBINDIR mkdir /s %TMPBINDIR
-
-  cdd %TMPDIR\Text\build\lib.win32-%npver
-  for %pydf in (*.pyd) do (
-    copy %pydf %TMPBINDIR
-    set MD5=%@MD5[%pydf]
-    echo add-ons\Text\%pydf %MD5 >> %TMPDIR\binaries\%pyver\stamps_pyd.txt	  
-  )
+  move /z dist\*.win32-py%npver.exe %TMPDIR\%PKG_TEXT-py%npver.exe
 )

install-scripts/createCommon__.btm

   REM # Delete existing orangeqt.pyd in TMPDIR (It will be moved into place later)
   if exist %TMPDIR\Orange\orangeqt.pyd del /q %TMPDIR\Orange\orangeqt.pyd
 
-  REM # compress pyd and create stamps_pyd.txt, needed for update from web (accessed by updateFromSVN.bat)
-  set TMPBINDIR=%TMPDIR\binaries\%pyver
-  if not direxist %TMPBINDIR\%pyver mkdir /s %TMPBINDIR
-
   cdd %PYORANGEDIR
   except (*_d.pyd) for %pydf in (*.pyd) do (
     if exist %TMPDIR\Orange\%pydf del /q %TMPDIR\Orange\%pydf
     copy %pydf %TMPDIR\Orange\
-    copy %pydf %TMPBINDIR
-  )
-
-  cdd %TMPBINDIR
-  if exist stamps_pyd.txt del /q stamps_pyd.txt
-  for %pydf in (*.pyd) do (
-    set MD5=%@MD5[%pydf]
-    echo %pydf %MD5 >> stamps_pyd.txt
   )
 
   if direxist %PARTY (
   ) else (
     echo installation file was not built because no 3rd-party software available
   )
+  type %COMPILELOG%
 )
-
-rem # compile documentation
-REM cdd %SCRIPTDIR\doc
-REM call compileDocumentation.btm
-REM cdd %WEBDOCDIR
-REM winrar a %DOWNLOADDIR\orange-chm.zip *.chm
-REM break_on_error

install-scripts/createSnapshot.btm

 rem # input arguments
 rem # %1 - folder with 3rd party software
 rem # - HG repository is updated to head
+rem # Required env variables:
+rem #    PUBLISH_URL - url (user@host) of the publish server
+rem #    ID_KEY - identity key file for logging into publish server
 
 call updateSetVariables__.btm snapshot
 set WIN_SNAPSHOT=orange-win-snapshot-hg-%daystr
 
 break_on_error
 
-rem # build msi file (disabled due to StrictVersion requirement for .msi)
-rem e:\Python27\python.exe setup.py bdist_msi
+move /z dist\Orange-?.*.zip %TMPDIR\%SOURCE_SNAPSHOT
 
-break_on_error
+cd %TMPDIR
+rem # remember new filenames
+call "%SCRIPTDIR\updateVersionsPy__.btm" filenames_win.set
 
 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 # Create a ftp batch script "move.scr".
+rem # (problem is sftp does not support an atomic move operation)
 
-rem except (%DOWNLOADDIR\orange*-snapshot-%daystr-*.exe) del %DOWNLOADDIR\orange*-snapshot-????-??-??-*.exe
+echo cd files > move.scr
 
-rem # publish
+for %FILENAME in (*.exe) do (
+	echo put %FILENAME %FILENAME.tmp >> move.scr
+	echo rm %FILENAME >> move.scr
+	echo rename %FILENAME.tmp %FILENAME >> move.scr
+)
 
-move /z dist\Orange-?.*.zip %DOWNLOADDIR\%SOURCE_SNAPSHOT
-move /z dist\Orange-?.*.msi %DOWNLOADDIR\%WIN_SNAPSHOT.msi
+echo put %SOURCE_SNAPSHOT %SOURCE_SNAPSHOT.tmp >> move.scr
+echo rm  %SOURCE_SNAPSHOT >> move.scr
+echo rename %SOURCE_SNAPSHOT.tmp %SOURCE_SNAPSHOT >> move.scr
 
-cdd %TMPDIR
-move /z *.exe %DOWNLOADDIR
-if not direxist %DOWNLOADDIR\binaries mkdir %DOWNLOADDIR\binaries
-move /sdz binaries %DOWNLOADDIR\binaries
+echo put filenames_win.set filenames_win.set.tmp >> move.scr
+echo rm filenames_win.set >> move.scr
+echo rename filenames_win.set.tmp filenames_win.set >> move.scr
 
-rem # remember new filenames
-cdd %SCRIPTDIR
-call updateVersionsPy__.btm
+echo exit >> move.scr
+
+rem # Finally move all the files
+psftp -i "%ID_KEY%" %PUBLISH_URL% -batch -be -b move.scr
+
+rem # Cleanup
+del /Q *.exe
+del /Q *.zip

install-scripts/dailyBuild.btm

+cdd E:\orange\scripts
+
+set PATH=C:\putty\bin;%PATH%
+set ID_KEY=%USERPROFILE%\ssh\id_rsa.ppk
+set PUBLISH_URL=download@biolab.si
+
+call updateAndCall.btm
+
+exit

install-scripts/updateAndCall.btm

 
 cdd e:\orange\scripts
-
-
-REM # Until orange-install-scripts repo is up this does not yet run
-REM call hg clone https://bitbucket.org/biolab/orange-install-scripts .
-REM call hg pull --update 
+ 
 
 REM call hg clone https://bitbucket.org/biolab/orange snapshot
 cdd snapshot
 copy /q /s snapshot\install-scripts\qt44-3rdparty qt44-3rdparty
 
 call callCreateSnapshot.btm
-shutdown -s

install-scripts/updateDoc__.btm

-pushd
-
-cdd %SCRIPTDIR
-del /yqfsx tempdoc
-
-copy /sq %WEBDOCDIR tempdoc
-cd tempdoc
-
-del /qyfsx links.htm path.htm "writing documentation.txt" ofb\formulas\* >& nul:
-
-del %DOWNLOADDIR\orange-doc-snap-*.zip
-"c:\program files\winrar\winrar.exe" a -r %DOWNLOADDIR\orange-doc-snap-%daystr.zip *
-set DOCUMENTATION="orange-doc-snap-%daystr.zip"
-cd  ..
-
-del /yqfsx tempdoc
-
-popd

install-scripts/updateSetVariables__.btm

 set SCRIPTDIR=%_CWD
 set TMPDIR=%SCRIPTDIR\%1
 set SOURCEDIR=%TMPDIR\source
-set DOWNLOADDIR=Z:\Volumes\download\
-
-REM # read filenames of current packages
-set /r %DOWNLOADDIR\filenames_win.set
 
 set daystr=%_YEAR-%@format[02,%_MONTH]-%@format[02,%_DAY]
 set nicedate=%_DAY %@INSTR[%@EVAL[3*%_MONTH-3],3,JanFebMarAprMayJunJulAugSepOctNovDec] %_YEAR
 REM # python, packaging and compiling
 set PYTHONBASE=e:\Python
 set PYTHONVERSIONS=26 27
-REM # text mining can not be compiled for Python 23
-set PYTHONVERSIONS_ADDONs=25 26 27
+
+set PYTHONVERSIONS_ADDONs=26 27
 alias python="%PYTHONBASE%27\python.exe"
-set .py="%PYTHONBASE%25\python.exe"
 
 alias nsis="c:\program files\nsis\makensis.exe"
-alias winrar="c:\program files\winrar\winrar.exe"
-alias upx="c:\program files\upx.exe"
 alias cmake="c:\program files\cmake 2.8\bin\cmake.exe"
 set QTVARS="e:\Qt\4.7.3\bin\qtvars.bat"
 call "c:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"

install-scripts/updateVersionsPy__.btm

 @echo off
-set fhandle=%@FILEOPEN[%DOWNLOADDIR\filenames_win.set, write, t]
+set fhandle=%@FILEOPEN[%1, write, t]
 set foo=%@FILEWRITE[%fhandle,VERSION=%VERSION]
 set foo=%@FILEWRITE[%fhandle,RELEASE_DATE=%RELEASE_DATE]