specs/stx-jv.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 10 Sep 2019 22:02:16 +0100
changeset 278 7ed1f5ec59c5
parent 273 70c505f690bf
child 281 987cd78c0e94
permissions -rw-r--r--
Use forked `stx:libjavascript` ...since the one from eXept's repositories is broken for too long...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     1
# A helper function to download and unpack pre-built stc and librun
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     2
# for those who are not lucky enough to have an access to sources
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
     3
def download_binary_component(component, directory)
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     4
  plat = nil
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     5
  blob = nil
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     6
  sha256 = nil
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
     7
  pattern = /prebuilt-#{Regexp.quote(component)}/
189
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
     8
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
     9
  build_url = %Q{https://swing.fit.cvut.cz/jenkins/job/stx_jv/lastStableBuild}
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    10
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    11
  origin_forest_url = HG::Repository.new(BUILD_DIR / '..').paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2) #/
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
    12
  # When building using Jan's staging repositories, use pre-built stc and librun
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
    13
  # from there too. 
189
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    14
  if (origin_forest_url =~ /192.168.27.250/) then
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
    15
    build_url = %Q{http://192.168.27.253:8080/job/stx_jv/lastStableBuild/}
189
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    16
  end
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    17
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    18
  build = Jenkins::Build.new(build_url)
5b2320f1f2e2 Rakefiles: allow to clone and build Smalltalk/X jv-branch 8.0.0 preview
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
    19
  platform = BUILD_TARGET
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
    20
  build.artifacts.each do | artifact |
110
da2585640b0c CI: Updated prebuilt STC and stx:librun download code to catch up with new pipleline jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 109
diff changeset
    21
    if (pattern =~ artifact.name) and (artifact.name.include? platform) then
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    22
      if artifact.name.end_with? '.sha256' then
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    23
        sha256 = artifact
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    24
      else
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    25
        blob = artifact
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    26
      end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    27
    end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    28
  end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    29
  if not blob then
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    30
    error "No binary component \"'#{component}\" found: #{build_url}/artifact/artifacts/"
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    31
  end
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    32
  if sha256 then
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    33
    info "Downloading binary component SHA265 checksum #{sha256.name}"
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    34
    sha256.download_to(directory)
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    35
    if File.exist? directory / "#{component}" and File.exist? directory / "#{component}.sha256" then
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    36
      # Compare a "current" checksum and the (possibly) "new" checkum.
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    37
      # if same, skip the download (assuming that version has been
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    38
      # downloaded already)
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    39
      sha256_current = File.read(directory / ".#{component}.sha256")
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    40
      sha256_new     = File.read(directory / sha256.name)
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    41
      if sha256_new == sha256_current then
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    42
        return
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    43
      end
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    44
    end
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    45
  end
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    46
  info "Downloading binary component #{blob.name}"
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    47
  blob.download_to(directory)
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    48
  info "Extracting binary component #{blob.name}"
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    49
  if File.exist? directory / component then
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    50
    rm_rf directory / component
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    51
  end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    52
  unzip directory / blob.name, remove: true
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    53
  if sha256 then
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    54
    mv directory / sha256.name, directory / ".#{component}.sha256"
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    55
  end
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    56
end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    57
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
project :'stx:jv-branch-core' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
  # Core Smalltalk/X - does contain only standard libraries,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
  # and development tools. Does not contain any other 'features'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
  # like XML suite, Java support. Usable as a basis for standalone
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
  # applications that needs some JV-branch features.
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
  import :'stx:baseline'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
102
fc572bd895f2 Cleanup: treat stx:stc & stx:librun as normal packages
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 101
diff changeset
    65
  # FORKED STC and librun
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    66
  package "stx:stc", :repository => :'jv-branch:public', :branch => 'jv',
108
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    67
    :checkout => (Proc.new do | pkg |
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    68
      # Download pre-compiled binary if user has no access to source code
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    69
      begin
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    70
        checkout pkg.repository, 'stx/stc', :branch => pkg.branch, :revision => pkg.revision
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    71
      rescue Exception
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    72
        download_binary_component('stc', BUILD_DIR / 'stx')
108
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    73
      end
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    74
    end),
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    75
    :update => (Proc.new do | pkg |
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    76
      if (File.exists? BUILD_DIR / 'stx' / 'stc' / '.hg' / 'hgrc') then
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    77
        update pkg.repository, 'stx/stc', :branch => pkg.branch, :revision => pkg.revision
237
69ab924b97bf Rakefiles: fixes to make it working on SWING build slaves
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 236
diff changeset
    78
      elsif not jenkins?
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    79
        download_binary_component('stc', BUILD_DIR / 'stx')
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    80
      end
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    81
    end)
102
fc572bd895f2 Cleanup: treat stx:stc & stx:librun as normal packages
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 101
diff changeset
    82
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    83
  package "stx:librun", :repository => :'jv-branch:public', :branch => 'jv',
108
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    84
    :checkout => (Proc.new do | pkg |
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    85
      # Download pre-compiled binary if user has no access to source code
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    86
      begin
237
69ab924b97bf Rakefiles: fixes to make it working on SWING build slaves
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 236
diff changeset
    87
        checkout pkg.repository, 'stx/librun', :branch => pkg.branch, :revision => pkg.revision
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    88
      rescue Exception
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    89
        download_binary_component('librun', BUILD_DIR / 'stx')
108
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    90
      end
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    91
    end),
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    92
    :update => (Proc.new do | pkg |
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    93
      if (File.exists? BUILD_DIR / 'stx' / 'librun' / '.hg' / 'hgrc') then
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    94
        update pkg.repository, 'stx/stc', :branch => pkg.branch, :revision => pkg.revision
237
69ab924b97bf Rakefiles: fixes to make it working on SWING build slaves
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 236
diff changeset
    95
      elsif not jenkins?
219
c96964104b1a Issue #110: download new (binary) `stx:stc` and `stx:librun` when doing `rake update`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 218
diff changeset
    96
        download_binary_component('librun', BUILD_DIR / 'stx')
273
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    97
      end
70c505f690bf Rakefiles: refactor access to stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    98
    end)
102
fc572bd895f2 Cleanup: treat stx:stc & stx:librun as normal packages
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 101
diff changeset
    99
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
  # FORKED libraries
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
  # ======================================================================
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
   102
  package "stx:libbasic", :repository => :'jv-branch:public', :branch => 'jv'
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   103
  package "stx:libbasic2", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   104
  package "stx:libbasic3", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   105
  package "stx:libcomp", :repository => :'jv-branch:public', :branch => 'jv'
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
   106
  package "stx:libtool", :repository => :'jv-branch:public', :branch => 'jv'
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   107
  package "stx:libtool2",:repository => :'jv-branch:public', :branch => 'jv'
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   108
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   109
  package "stx:libview", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   110
  package "stx:libview2", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   111
  package "stx:libwidg", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   112
  package "stx:libwidg2", :repository => :'jv-branch:public', :branch => 'jv'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   114
  package "stx:goodies/sunit", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   115
  package "stx:goodies/monticello", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   116
  package "stx:goodies/refactoryBrowser", :repository => :'jv-branch:public', :branch => 'jv'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   117
  package "stx:libsvn", :repository => :'jv-branch:public', :branch => 'jv'
278
7ed1f5ec59c5 Use forked `stx:libjavascript`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   118
  package "stx:libjavascript", :repository => :'jv-branch:public', :branch => 'jv'
7ed1f5ec59c5 Use forked `stx:libjavascript`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   119
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
  # Some more development tools to build and preload
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
  # ======================================================================
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   123
  package "stx:goodies/xml/vw", :repository => :'exept:public'
55
a5eedad6187d Project `stx:jv-branch`: Added package "stx:goodies/xml/stx"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
   124
  package "stx:goodies/xml/stx", :repository => :'exept:public'
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   125
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
  # SmallSense
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   127
  package "stx:goodies/regex", :repository => :'exept:public'
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   128
  package "stx:goodies/smallsense", :repository => :'jv-branch:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
  package "stx:goodies/smallsense/refactoring_custom"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   131
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
    # Build and install documentation for stx:libjava and stx:libscm/mercurial
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   134
    task "install:pre" do
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
      chdir BUILD_DIR / 'stx' / 'libjava' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
        make "doc-install"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
      chdir BUILD_DIR / 'stx' / 'libscm' / 'mercurial' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
        make "doc-install"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   143
    # Try execute run the VM if it starts up
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
    task :'compile:post' do
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   145
      if PROJECT == 'stx:jv-branch' then
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
        chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
          if win32?
198
9d1750614ee9 Cleanup: removed (now obsolete) hack for `stx:libtool`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 197
diff changeset
   148
            sh "smalltalk.bat --abortOnSEGV -I --quick --eval \"Stdout nextPutLine:'OKay, VM runs'. Smalltalk exit: 0\""
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
          else
198
9d1750614ee9 Cleanup: removed (now obsolete) hack for `stx:libtool`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 197
diff changeset
   150
            sh "./smalltalk --abortOnSEGV -I --quick --eval \"Stdout nextPutLine:'OKay, VM runs'. Smalltalk exit: 0\""
101
32f9287b419a Cleanup: Nuked leftover code for using BCC 5.5.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 93
diff changeset
   151
          end
32f9287b419a Cleanup: Nuked leftover code for using BCC 5.5.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 93
diff changeset
   152
        end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
project :'stx:jv-branch' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
  # Standard Smalltalk/X IDE with some nice libraries preloaded
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
  import :'stx:jv-branch-core'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
  app_name "smalltalkx-jv-branch"
195
75e457fec9cc Fixed slip in `hglib.rb` introduced in commit e665031cade7
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
   168
  app_version "8.0.0_#{BUILD_ID}"
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   169
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
  # Forked PetitParser
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   171
  package "stx:goodies/petitparser", :repository => :'jv-branch:public', :link => false
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   172
  package "stx:goodies/petitparser/tests", :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
  package "stx:goodies/petitparser/analyzer",  :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
  package "stx:goodies/petitparser/analyzer/tests",  :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   175
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
  # Monticello
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   177
  package "stx:libcompat", :repository => :'exept:public'
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   178
  package "stx:goodies/communication", :repository => :'exept:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   179
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
  # Java support
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
   181
  package "stx:libjava", :repository => :'jv-branch:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   182
  package "stx:libjava/tools"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
  package "stx:libjava/experiments"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   184
  #package "stx:libjava/examples" :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   185
200
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   186
  # VDB
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   187
  package 'stx:goodies/magritte', :repository => :'exept:public', :link => false
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   188
  package 'stx:goodies/announcements', :repository => :'exept:public'
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   189
  package 'jv:libgdbs', :repository => :'jv-branch:public', :link => false
213
58e61f63be9c Added tests for `jv:libgdbs` to default test suite.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 212
diff changeset
   190
  package 'jv:libgdbs/tests', :repository => :'jv-branch:public', :link => false
200
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   191
  package 'jv:vdb', :repository => :'jv-branch:public', :link => false
265
92e3731a1532 Add `jv:vdb/plugins/bee` to toy archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 260
diff changeset
   192
  package 'jv:vdb/plugins/bee', :repository => :'jv-branch:public', :link => false
200
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   193
bf8b3d4e7865 Added VDB to Smalltalk/X 8.0 builds
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 198
diff changeset
   194
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   195
  # Smalltalk/X IDE
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
   196
  application 'stx:projects/smalltalk', :repository => :'jv-branch:public', :branch => 'jv'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   197
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   198
  package 'stx:libscm', :repository => :'jv-branch:public'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   199
  package 'stx:libscm/common', :repository => :'jv-branch:public'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   200
  package 'stx:libscm/mercurial', :repository => :'jv-branch:public'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   201
  package 'stx:libscm/mercurial/monticello', :repository => :'jv-branch:public'
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   202
  package 'stx:goodies/ring', :repository => :'jv-branch:public', :link => false
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   203
  package 'stx:goodies/libcairo', :repository => :'jv-branch:public', :link => false
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   204
  package 'stx:goodies/cypress', :repository => :'jv-branch:public'
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   205
  package "stx:goodies/xmlsuite", :repository => :'jv-branch:public'
93
650412e81596 Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   206
  package "stx:goodies/loggia", :repository => :'exept:public', :link => false
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   207
  package 'stx:goodies/smaCC',:repository => :'jv-branch:public'
236
5a4e789cdd40 Merged branch stx-8.0.0 into default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 155 219
diff changeset
   208
  package 'stx:goodies/regression',:repository => :'jv-branch:public', :branch => 'jv', :link => false
170
c0383fb4e51f Rakefiles: give repository names more meaningful names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
   209
  package "stx:goodies/builder", :repository => :'jv-branch:public',:branch => 'jv', :link => false
67
75b6eb7b781c Added support for canonical, upstream and staging repositores.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 64
diff changeset
   210
  package "stx:goodies/builder/reports"
49
53414f4122e3 Project stx:jv-branch: make `rake test` to run tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 47
diff changeset
   211
53414f4122e3 Project stx:jv-branch: make `rake test` to run tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 47
diff changeset
   212
  # Define a "default" test suite, i.e., a set of tests that are run when
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   213
  # user does `rake test`.
104
3c610bb4c1f0 CI: Remove hack to disable standard test suite on SWING CI
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   214
  package 'stx:libview/tests', :test => true;
197
b0874b09676a Added tests for `stx:libwidg` and `stx:libtool`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 195
diff changeset
   215
  package 'stx:libwidg/tests', :test => true;
b0874b09676a Added tests for `stx:libwidg` and `stx:libtool`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 195
diff changeset
   216
  package 'stx:libtool/tests', :test => true;
104
3c610bb4c1f0 CI: Remove hack to disable standard test suite on SWING CI
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   217
  package 'stx:libjava', :test => true;
3c610bb4c1f0 CI: Remove hack to disable standard test suite on SWING CI
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   218
  package 'stx:libjava/tools', :test => true;
3c610bb4c1f0 CI: Remove hack to disable standard test suite on SWING CI
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   219
  package 'stx:goodies/regression', :test => true;
3c610bb4c1f0 CI: Remove hack to disable standard test suite on SWING CI
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   220
  package 'stx:libscm/mercurial', :test => true;
213
58e61f63be9c Added tests for `jv:libgdbs` to default test suite.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 212
diff changeset
   221
  package 'jv:libgdbs/tests', :test => true;
260
7aef1f1a5071 Add VDB tests to "standard testsuite"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 237
diff changeset
   222
  package 'jv:vdb/tests', :test => true;
108
054919e32ff0 Various fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   223
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   224
  tasks do
54
a169d82bb0b0 Project stx:jv-branch: oops, checkout CharacterEncoderCodeGenerator into stx:goodies
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   225
    # We need to checkout CharacterEncoderCodeGenerator from stx:goodies
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   226
    # because RegressionTests::CharacterTests>>test01_CaseTesting needs that.
82
e6de30bc6669 Oops, fixed checkout rule for `CharacterEncoderCodeGenerator.st` (needed by tests)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 70
diff changeset
   227
    task 'checkout:post' => BUILD_DIR / 'stx' / 'goodies' / 'CharacterEncoderCodeGenerator.st'
e6de30bc6669 Oops, fixed checkout rule for `CharacterEncoderCodeGenerator.st` (needed by tests)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 70
diff changeset
   228
    file (BUILD_DIR / 'stx' / 'goodies' / 'CharacterEncoderCodeGenerator.st') do
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   229
      checkout(:'exept:public', 'stx/goodies/CharacterEncoderCodeGenerator.st')
54
a169d82bb0b0 Project stx:jv-branch: oops, checkout CharacterEncoderCodeGenerator into stx:goodies
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   230
    end
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   231
212
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   232
    # Checkout & install demos. Too bad that demos are not in a package itself but
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   233
    # rather a set of scaterred files here and there. So we have to checkout
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   234
    # and install them manually
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   235
    task 'checkout:post' => 'checkout:demos'
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   236
    task 'checkout:demos' => [ BUILD_DIR / 'stx' / 'doc' / 'coding' ,
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   237
                               BUILD_DIR / 'stx' / 'goodies'  / 'demos' ,
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   238
                               BUILD_DIR / 'stx' / 'clients' ]
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   239
    file BUILD_DIR / 'stx' / 'doc' / 'coding' do
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   240
      checkout(:'exept:public', 'stx/doc/coding')
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   241
    end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   242
    file BUILD_DIR / 'stx' / 'goodies'  / 'demos' do
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   243
      checkout(:'exept:public', 'stx/goodies/demos')
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   244
    end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   245
    file BUILD_DIR / 'stx' / 'clients' do
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   246
      checkout(:'exept:public', 'stx/clients')
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   247
    end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   248
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   249
    task 'dist:jv:post' => 'dist:jv:demos'
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   250
    task 'dist:jv:demos' do
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   251
      cp_rx BUILD_DIR / 'stx' / 'doc' / 'coding', $install_jv_dirs[:pkg_dir] / 'stx' / 'doc' do |fname|
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   252
        # fname is full path!!!
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   253
        /\.svn|CVS|\.cvsignore|tests/.match(fname).nil?
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   254
      end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   255
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   256
      cp_rx BUILD_DIR / 'stx' / 'goodies' / 'demos', $install_jv_dirs[:pkg_dir] / 'stx' / 'goodies'  do |fname|
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   257
        # fname is full path!!!
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   258
        /\.svn|CVS|\.cvsignore|tests/.match(fname).nil?
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   259
      end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   260
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   261
      cp_rx BUILD_DIR / 'stx' / 'clients', $install_jv_dirs[:pkg_dir] / 'stx' do |fname|
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   262
        # fname is full path!!!
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   263
        /\.svn|CVS|\.cvsignore|tests/.match(fname).nil?
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   264
      end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   265
    end
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   266
218
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   267
    # Normally the test package is not compiled but we have to
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   268
    # compile programs used in tests before running the tests
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   269
    # themselves. Sigh...
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   270
    task "test:package:jv:libgdbs/tests:pre" do
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   271
      chdir BUILD_DIR / 'jv' / 'libgdbs' / 'tests' do
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   272
        sh "make -f Makefile.init mf" if unix?
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   273
        make "testprograms"
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   274
      end
327e28e1fcaf Rakefiles: refactored "test" targets to support "...:pre" and "...:post" hooks
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 213
diff changeset
   275
    end
260
7aef1f1a5071 Add VDB tests to "standard testsuite"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 237
diff changeset
   276
    # VDB tests are reusing libgdbs test programs
7aef1f1a5071 Add VDB tests to "standard testsuite"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 237
diff changeset
   277
    task "test:package:jv:vdb/tests:pre" => "test:package:jv:libgdbs/tests:pre"
212
6899f0183a0d Rakefiles: distribute demos in the "toy" archive
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 209
diff changeset
   278
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   279
    task :'install:main' => :'dist:jv-branch'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   280
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   281
    task :'dist:jv:pre' => :'stx:jv-branch:extractver'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   282
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   283
    if win32?
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   284
      app_name    = project.app_name      || (raise Exception.new("No app_name property specified"))
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   285
	    app_version = project.app_version   || (raise Exception.new("No app_version property specified"))
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   286
	    version = app_version.split('_').first
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   287
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   288
	    install_dir = ARTIFACTS_DIR / BUILD_NAME
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   289
	    bin_dir = install_dir / 'bin'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   290
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   291
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   292
    	cairo_dlls = nil
169
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   293
    	if /i686/ =~ BUILD_TARGET
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   294
	      cairo_dlls =  [
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   295
	      	'libcairo-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   296
					'libfontconfig-1.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   297
					'libfreetype-6.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   298
					'liblzma-5.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   299
					'libpixman-1-0.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   300
					'libpng15-15.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   301
					'libxml2-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   302
					'zlib1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   303
					]
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   304
			else
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   305
				cairo_dlls =  [
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   306
	      	'fontconfig.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   307
	      	'iconv.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   308
	      	'libcairo-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   309
	      	'libpng16.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   310
	      	'libxml2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   311
	      	'pixman-1.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   312
	      	'zlib1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   313
	      ]
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   314
			end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   315
13
ba905210e6bb Make more suitable guess of actual version string
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11
diff changeset
   316
    	task :'dist:jv:post' => [ :'stx:jv-branch:extractver' , :'dist:jv:variables' ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   317
    	cairo_dlls.each do | dll |
13
ba905210e6bb Make more suitable guess of actual version string
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11
diff changeset
   318
    		task :'dist:jv:post' => [ bin_dir / dll ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   319
				file bin_dir / dll do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   320
					mkdir_p bin_dir
169
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   321
					cp BUILD_DIR / 'stx' / 'goodies' / 'libcairo' / 'support' / 'win32' / (/i686/ =~ BUILD_TARGET ? 'i586' : 'x86_64') / dll , bin_dir / dll
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   322
				end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   323
    	end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   324
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   325
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   326
    task :'dist:jv-branch' => [ :'dist:jv:all',
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   327
                                :'dist:jv:doc' ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   328
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   329
    task :'install:main' => [:'stx:jv-branch:extractver']
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   330
    task :'artifacts:main' => [:'stx:jv-branch:extractver']
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   331
    task :'artifacts:post' => [:'artifacts:prebuilt-stc', :'artifacts:prebuilt-librun' ]
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   332
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   333
    # Add dependency of stc and librun archive tasks on :'stx:jv-branch:extractver' so
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   334
    # they create archives with up-to-date version.
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   335
    task :'artifacts:prebuilt-stc' => :'stx:jv-branch:extractver'
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   336
    task :'artifacts:prebuilt-librun' => :'stx:jv-branch:extractver'
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   337
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   338
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   339
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   340
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   341
task :'stx:jv-branch:extractver' => :'setup' do
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   342
  ver = nil
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   343
  if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   344
    stx_exe = 'stx.com'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   345
  else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   346
    stx_exe = './stx'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   347
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   348
  chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   349
    ver = %x(#{stx_exe} --eval "Stdout nextPutAll: Smalltalk versionString")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   350
    if $?.exitstatus != 0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   351
      raise Exception.new("Failed extract version from stx")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   352
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   353
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   354
  ver = (ver.split(".")[0..2]).join(".")
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   355
  project.app_version "#{ver}_#{BUILD_ID}"
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   356
  # This is really ugly. We need to clean that up...
169
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   357
  BUILD_NAME.replace "#{project.app_name}-#{project.app_version}_#{BUILD_TARGET}"
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   358
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   359
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   360
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   361
project :'stx:jv-branch:for-reports-only' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   362
  import :'stx:jv-branch'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   363
109
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   364
  # Sigh, if we're about to run tests only, we don't want to
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   365
  # run standard tests so we need to clean test flag.
109
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   366
  package 'stx:libview/tests', :test => false;
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   367
  package 'stx:libjava', :test => false;
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   368
  package 'stx:libjava/tools', :test => false;
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   369
  package 'stx:goodies/regression', :test => false;
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   370
  package 'stx:libscm/mercurial', :test => false;
d4103254e0a8 CI: Fixed old-style CI test jobs
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
   371
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   372
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   373
    task :'stx:projects/smalltalk:pre' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   374
      chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   375
         if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   376
           system "bmake clobber"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   377
         else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   378
           system "make clobber"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   379
         end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   380
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   381
    end
177
6ad33f64e566 Rakefiles: make use of (new) `include` parameter to `zip()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 170
diff changeset
   382
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   383
    clear :'dist:install' => :'dist:jv-branch'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   384
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   385
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   386