Rakefile
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 20 Jan 2020 11:34:02 +0000
changeset 286 c08455e14746
parent 130 834bf4be5407
child 296 11c9383642c1
permissions -rw-r--r--
Rakefiles: add support for manual dependency definitions Normally, pacjage dependencies are extracted automatically from package definition but eXept sometimes get dependencies wrong. As we (still, sigh) use some packages form eXept's CVS tree, this commit introduces `dependencies.rbspec` that has these manually fixed. This commit also includes fix for an issue with `stx:goodies/communication`
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
abb35e8d97a7 Add `bin` directory to PATH so build scripts may use scripts located there
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
     1
$:.push('.')
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
require 'rakelib/support.rb'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
import 'rakelib/info.rake'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
import 'rakelib/setup.rake'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
import 'rakelib/checkout.rake'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
import 'rakelib/compile.rake'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
import 'rakelib/test.rake'
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
     9
import 'rakelib/install.rake'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
import 'rakelib/dist-jv.rake'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
import 'rakelib/clean.rake'
68
61d8bee7c4d4 Added new tasks - `workflow:push-upstream` and `workflow:push-staging`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    12
import 'rakelib/workflow.rake'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
130
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    14
# Automatically perform task :'setup' to create and define
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    15
# tasks based on current spec. This allows user to invoke
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    16
# generated tasks manually without having to manually run
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    17
# task `setup`
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    18
Rake.application.load_imports()
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    19
Rake::Task[:'setup'].invoke()
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    20
834bf4be5407 Rakefiles: setup all tasks automatically when main `Rakefile` is loaded
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 68
diff changeset
    21
5
0e2993dac13e Jenkinsfile.rb: Jenkins build script refactored and simplified.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    22
desc "Fetch sources and compiles project (default task)"
0e2993dac13e Jenkinsfile.rb: Jenkins build script refactored and simplified.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    23
task :'default' => [ :'setup', :'checkout', :'compile' ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
task :'pre'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
task :'post'                  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
24
ae6fc15070e4 Jenkinsfile.rb: added new target `jenkins:job`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 9
diff changeset
    29
task :'jenkins:job' => [ :'setup', :'checkout', :'update', :'compile', :'test', :'lint', :'artifacts' ]
40
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    30
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    31
desc "Run interactive Ruby shell with project loaded and all tasks defined"
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    32
task :'shell' => [:'setup' ] do 
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    33
  begin
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    34
    require 'pry'
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    35
    begin
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    36
      require 'pry-byebug'
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    37
    rescue LoadError
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    38
      warn("`pry-byebug` not installed, run `gem install pry-byebug` to install it")
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    39
    end
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    40
    binding.pry
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    41
  rescue LoadError 
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    42
    error("`pry` not installed, run `gem install pry` to install it")
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    43
  end
f75898c6595d Debugging support
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    44
end