1RBM-PUBLISH(1)                                                  RBM-PUBLISH(1)
2
3
4

NAME

6       rbm-publish - Publish some packages or files
7

SYNOPSIS

9       rbm publish <project> [--publish-src-dir=<dir>] [options]
10

DESCRIPTION

12       Build a package and publish it. See rbm-pkg(1) for details about how
13       the package is built.
14
15       If the option --publish-src-dir is used, then the package is not built,
16       and instead the packages or files present in that directory are
17       published.
18

CONFIGURATION OPTIONS

20       publish
21           This is the content of the script that is used to upload the
22           packages or files to a repository. This script will be executed
23           from the directory containing the files to publish. This option has
24           no default value.
25
26       See rbm_config(7) for all other options.
27

COMMAND LINE OPTIONS

29       The command line options related to publish are :
30
31       --publish-src-dir
32           The directory containing the files that are going to be published.
33
34       See rbm_cli(7) for all other options.
35

EXAMPLES

37       In this example, we want to publish packages for Mageia and Debian. On
38       Mageia, the repository metadata are generated using genhdlist2. On
39       Debian the new package is included in the repository using reprepro.
40
41       The rbm configuration looks like this :
42
43           targets:
44             Mageia:
45               repo_dir: /path/to/mageia/repo
46               publish: |
47                #!/bin/sh
48                cp -va noarch/*.rpm [% c('repo_dir') %]
49                genhdlist2 [% c('repo_dir') %]
50             Debian:
51               repo_dir: /path/to/debian/repo
52               publish: |
53                 #!/bin/sh
54                 reprepro -b [% c('repo_dir') %] include \
55                             [% c('lsb_release/codename') %] *.changes
56
57       If we want to upload the packages on a remote server, before including
58       them on the repository, this can be done like this :
59
60           targets:
61             Debian:
62               repo_dir: /path/to/debian/repo
63               publish: |
64                 #!/bin/sh
65                 reprepro -b [% c('repo_dir') %] include \
66                             [% c('lsb_release/codename') %] *.changes
67           steps:
68             publish:
69               ssh_host: publish_server.somedomain
70               remote_exec: "[% c('remote_ssh') %]"
71
72       An alternative could be to generate the repository locally, and add an
73       rsync command at the end of the publish script to upload the repository
74       to your publication server :
75
76           targets:
77             Debian:
78               local_repo: /path/to/debian/repo
79               publish: |
80                 #!/bin/sh
81                 reprepro -b [% c('local_repo') %] include \
82                             [% c('lsb_release/codename') %] *.changes
83                 rsync -avH --delete [% c('local_repo') %] publish_server.somedomain:/repo
84

SEE ALSO

86       rbm(1), rbm-pkg(1)
87
88
89
90                                  01/30/2020                    RBM-PUBLISH(1)
Impressum