specs/stx-jv.rbspec
changeset 152 22e0e7bc6180
parent 126 9cd66b79ca54
child 155 31e32b21a711
--- a/specs/stx-jv.rbspec	Tue Sep 19 15:46:15 2017 +0100
+++ b/specs/stx-jv.rbspec	Mon Oct 16 20:31:57 2017 +0100
@@ -1,4 +1,4 @@
-def build_platform_id() 
+def build_platform_id()
   return "#{ARCH}-#{win32? ? 'win32' : RbConfig::CONFIG['host_os']}"
 end
 
@@ -8,16 +8,16 @@
   plat = nil
   blob = nil
   sha256 = nil
-  if win32? then        
+  if win32? then
       plat = 'Windows'
-  elsif linux?        
+  elsif linux?
     plat = 'Linux'
-  else        
+  else
     error_unsupported_platform()
   end
   build = Jenkins::Build.new(%Q{https://swing.fit.cvut.cz/jenkins/job/stx_jv/lastStableBuild})
   platform = build_platform_id()
-  build.artifacts.each do | artifact |    
+  build.artifacts.each do | artifact |
     if (pattern =~ artifact.name) and (artifact.name.include? platform) then
       if artifact.name.end_with? '.sha256' then
         sha256 = artifact
@@ -48,9 +48,9 @@
   import :'stx:baseline'
 
   # FORKED STC and librun
-  package "stx:stc", :repository => :'swing:private:hg', :branch => 'jv', 
+  package "stx:stc", :repository => :'swing:private:hg', :branch => 'jv',
     :checkout => (Proc.new do | pkg |
-    # Download pre-compiled binary if user has no access to source code    
+    # Download pre-compiled binary if user has no access to source code
     if Rake::Stx::Configuration::Repository::find(pkg.repository) then
           checkout pkg.repository, 'stx/stc', :branch => pkg.branch, :revision => pkg.revision
     else
@@ -65,7 +65,7 @@
     end
   end)
 
-  package "stx:librun", :repository => :'swing:private:hg', :branch => 'jv', 
+  package "stx:librun", :repository => :'swing:private:hg', :branch => 'jv',
     :checkout => (Proc.new do | pkg |
     # Download pre-compiled binary if user has no access to source code
     if Rake::Stx::Configuration::Repository::find(pkg.repository) then
@@ -90,7 +90,7 @@
   package "stx:libcomp", :repository => :'bitbucket:janvrany', :branch => 'jv'
   package "stx:libtool", :repository => :'bitbucket:janvrany', :branch => 'jv'
   package "stx:libtool2",:repository => :'bitbucket:janvrany', :branch => 'jv'
- 
+
   package "stx:libview", :repository => :'bitbucket:janvrany', :branch => 'jv'
   package "stx:libview2", :repository => :'bitbucket:janvrany', :branch => 'jv'
   package "stx:libwidg", :repository => :'bitbucket:janvrany', :branch => 'jv'
@@ -105,16 +105,16 @@
   # ======================================================================
   package "stx:goodies/xml/vw", :repository => :'exept:public'
   package "stx:goodies/xml/stx", :repository => :'exept:public'
-  
+
   # SmallSense
   package "stx:goodies/regex", :repository => :'exept:public'
   package "stx:goodies/smallsense", :repository => :'bitbucket:janvrany'
   package "stx:goodies/smallsense/refactoring_custom"
 
-  
+
   tasks do
     # Build and install documentation for stx:libjava and stx:libscm/mercurial
-    task "install:pre" do 
+    task "install:pre" do
       chdir BUILD_DIR / 'stx' / 'libjava' do
         make "doc-install"
       end
@@ -125,7 +125,7 @@
 
     # Try execute run the VM if it starts up
     task :'compile:post' do
-      if PROJECT == 'stx:jv-branch' then  
+      if PROJECT == 'stx:jv-branch' then
         chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
           if win32?
             cmd = "smalltalk.bat --abortOnSEGV -I --quick --eval \"Stdout nextPutLine:'OKay, VM runs'. Smalltalk exit: 0\""
@@ -138,11 +138,11 @@
         end
       end
     end
-        
+
     if win32_wine?
-      task :'stx:projects/smalltalk:pre' do   
-        chdir (BUILD_DIR / 'stx' / 'projects' / 'smalltalk') do   
-          make "buildDate.h"    
+      task :'stx:projects/smalltalk:pre' do
+        chdir (BUILD_DIR / 'stx' / 'projects' / 'smalltalk') do
+          make "buildDate.h"
         end
       end
 
@@ -188,7 +188,7 @@
 
 
   app_name "smalltalkx-jv-branch"
-  app_version "6.2.5_#{BUILD_ID}"
+  app_version "6.2.6_#{BUILD_ID}"
 
   # Forked PetitParser
   package "stx:goodies/petitparser", :repository => :'bitbucket:janvrany', :link => false
@@ -216,7 +216,7 @@
   package 'stx:goodies/ring', :repository => :'bitbucket:janvrany', :link => false
   package 'stx:goodies/libcairo', :repository => :'bitbucket:janvrany', :link => false
   package 'stx:goodies/cypress', :repository => :'bitbucket:janvrany'
-  package "stx:goodies/xmlsuite", :repository => :'bitbucket:janvrany'  
+  package "stx:goodies/xmlsuite", :repository => :'bitbucket:janvrany'
   package "stx:goodies/loggia", :repository => :'exept:public', :link => false
   package 'stx:goodies/smaCC',:repository => :'bitbucket:janvrany'
   package 'stx:goodies/regression',:repository => :'bitbucket:janvrany', :branch => 'jv', :link => false
@@ -224,7 +224,7 @@
   package "stx:goodies/builder/reports"
 
   # Define a "default" test suite, i.e., a set of tests that are run when
-  # user does `rake test`. 
+  # user does `rake test`.
   package 'stx:libview/tests', :test => true;
   package 'stx:libjava', :test => true;
   package 'stx:libjava/tools', :test => true;
@@ -233,17 +233,17 @@
 
   tasks do
     # We need to checkout CharacterEncoderCodeGenerator from stx:goodies
-    # because RegressionTests::CharacterTests>>test01_CaseTesting needs that. 
+    # because RegressionTests::CharacterTests>>test01_CaseTesting needs that.
     task 'checkout:post' => BUILD_DIR / 'stx' / 'goodies' / 'CharacterEncoderCodeGenerator.st'
     file (BUILD_DIR / 'stx' / 'goodies' / 'CharacterEncoderCodeGenerator.st') do
-      checkout(:'exept:public', 'stx/goodies/CharacterEncoderCodeGenerator.st')      
+      checkout(:'exept:public', 'stx/goodies/CharacterEncoderCodeGenerator.st')
     end
-  
+
     task :'install:main' => :'dist:jv-branch'
 
     task :'dist:jv:pre' => :'stx:jv-branch:extractver'
 
-    if win32?     	
+    if win32?
       app_name    = project.app_name      || (raise Exception.new("No app_name property specified"))
 	    app_version = project.app_version   || (raise Exception.new("No app_version property specified"))
 	    version = app_version.split('_').first
@@ -251,10 +251,10 @@
 	    install_dir = ARTIFACTS_DIR / BUILD_NAME
 	    bin_dir = install_dir / 'bin'
 
-	    
+
     	cairo_dlls = nil
     	if ARCH == 'i386'
-	      cairo_dlls =  [ 
+	      cairo_dlls =  [
 	      	'libcairo-2.dll' ,
 					'libfontconfig-1.dll' ,
 					'libfreetype-6.dll' ,
@@ -265,7 +265,7 @@
 					'zlib1.dll'
 					]
 			else
-				cairo_dlls =  [ 
+				cairo_dlls =  [
 	      	'fontconfig.dll' ,
 	      	'iconv.dll' ,
 	      	'libcairo-2.dll' ,
@@ -286,12 +286,12 @@
     	end
     end
 
-    task :'dist:jv-branch' => [ :'dist:jv:all',                                                          
+    task :'dist:jv-branch' => [ :'dist:jv:all',
                                 :'dist:jv:doc' ]
 
     task :'install:main' => [:'stx:jv-branch:extractver']
     task :'artifacts:main' => [:'stx:jv-branch:extractver']
-    task :'artifacts:post' => [:'stx:jv-branch:extractver'] do  
+    task :'artifacts:post' => [:'stx:jv-branch:extractver'] do
       # Just to be sure, refuse to create stc and librun archives
       # if the directory contain sources. This is to prevent accidental
       # leak of non-disclosed sources. Better safe than sorry!
@@ -299,14 +299,14 @@
         puts "WARNING: NOT CREATING stc archive since directory contains sources!!!"
       else
         # Be paranoid, do cleanup here. Should have been done, but who knows...
-        cleanup_stc() 
+        cleanup_stc()
     	  zip BUILD_DIR / 'stx' / 'stc' , archive: ARTIFACTS_DIR / "#{project.app_name}-#{project.app_version}_#{build_platform_id()}_prebuilt-stc"
       end
       if core_developer? || (File.exist? BUILD_DIR / 'stx' / 'librun' / '.hg') || (File.exist? BUILD_DIR / 'stx' / 'librun' / 'CVS') then
         puts  "WARNING: NOT CREATING librun archive since directory contains sources!!!"
       else
         # Be paranoid, do cleanup here. Should have been done, but who knows...
-        cleanup_librun() 
+        cleanup_librun()
     	  zip BUILD_DIR / 'stx' / 'librun' , archive: ARTIFACTS_DIR / "#{project.app_name}-#{project.app_version}_#{build_platform_id()}_prebuilt-librun"
       end
     end
@@ -337,7 +337,7 @@
   import :'stx:jv-branch'
 
   # Sigh, if we're about to run tests only, we don't want to
-  # run standard tests so we need to clean test flag. 
+  # run standard tests so we need to clean test flag.
   package 'stx:libview/tests', :test => false;
   package 'stx:libjava', :test => false;
   package 'stx:libjava/tools', :test => false;
@@ -354,7 +354,7 @@
          end
       end
     end
-    
+
     clear :'dist:install' => :'dist:jv-branch'
   end
 end