1RBM_TARGETS(7) RBM_TARGETS(7)
2
3
4
6 rbm_targets - rbm targets configuration
7
9 When you are building packages you might want to build them in
10 different situations, with different options. The targets allow you to
11 define those options.
12
13 For instance you could be doing nightly builds of your packages, local
14 test builds when you are working on the developpement of a new feature,
15 and from time to time build a package for a new release. In such
16 situation, you could use command line arguments to change the options,
17 or change the config file each time, but that is not very convenient.
18 Instead you can define targets with any number of options, and use a
19 single argument to select the target.
20
22 The targets can be defined in any of the configuration files, using the
23 targets option. This option is an hash, with the target names as keys,
24 and as value an other hash containing the options to be used for this
25 target.
26
27 As an example we could define the following targets :
28
29 • the dev target, for daily development, from the master branch. You
30 don’t to use pbuilder, so you can have your package built more
31 quickly. You don’t want to sign the packages. And you want this
32 target to be the default.
33
34 • the release target, for building packages for a new release. You
35 want to use pbuilder to make sure it is built in a clean chroot.
36 You only want to build them from gpg signed tags. You want to sign
37 the packages with a specific key.
38
39 In such case, the following targets configuration could be used :
40
41 targets:
42 dev:
43 git_hash: master
44 use_pbuilder: 0
45 release:
46 use_pbuilder: 1
47 debsign_keyid: 123456
48 tag_gpg_id: 1
49
50 If the value of a target is not a hash containing options, but a string
51 or an array of strings, then this or those names are used as targets.
52 This is useful if you want to say that a target is the same as an other
53 one, or to extend a target.
54
55 You can use this if you want to set a default target. When no target
56 has been selected, the notarget target is used. In this example, we set
57 dev as the default target:
58
59 targets:
60 notarget: dev
61 dev:
62 git_hash: master
63 use_pbuilder: 0
64 release:
65 use_pbuilder: 1
66 debsign_keyid: 123456
67 tag_gpg_id: 1
68
69 In this example we extend the release target as release_1 to add a
70 git_hash:
71
72 targets:
73 release_1:
74 - git_hash_version_1
75 - release
76 release:
77 use_pbuilder: 1
78 debsign_keyid: 123456
79 tag_gpg_id: 1
80 git_hash_version_1:
81 git_hash: version-1.0
82
84 The target to be used can be selected with the --target command line
85 option. You can select more than one target by giving the option
86 multiple times, and in this case they will be used in the order given
87 on the command line. If no target is selected, then the notarget target
88 is used.
89
90 For example, if you want to build a debian package for dev target :
91
92 $ rbm deb --target dev
93
94 If you want to build a debian package for the release target, using the
95 0.1.2.3 tag:
96
97 $ rbm deb --target release --git-hash 0.1.2.3
98
99 Sometime, an option in one project will use the value of an option from
100 an other project (with the pc template function, see rbm_templates(7)
101 for details), or a project will use the output of an other project as
102 input file (see rbm_input_files(7) for details). In such cases, you may
103 want to select a target to be applied only for a specific project. This
104 can be done with the following syntax:
105
106 $ rbm build --target project:target
107
109 rbm(1), rbm_config(7),
110
111
112
113 07/23/2021 RBM_TARGETS(7)