author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 21 Sep 2018 23:14:41 +0100 | |
changeset 255 | 6d6880749905 |
parent 130 | 834bf4be5407 |
child 296 | 11c9383642c1 |
permissions | -rw-r--r-- |
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 | 30 |
|
31 |
desc "Run interactive Ruby shell with project loaded and all tasks defined" |
|
32 |
task :'shell' => [:'setup' ] do |
|
33 |
begin |
|
34 |
require 'pry' |
|
35 |
begin |
|
36 |
require 'pry-byebug' |
|
37 |
rescue LoadError |
|
38 |
warn("`pry-byebug` not installed, run `gem install pry-byebug` to install it") |
|
39 |
end |
|
40 |
binding.pry |
|
41 |
rescue LoadError |
|
42 |
error("`pry` not installed, run `gem install pry` to install it") |
|
43 |
end |
|
44 |
end |