aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cli
blob: 52dd44ea446ff2c4c2cd76072bcf722f0672afcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// file      : bpkg/rep-add.cli
// license   : MIT; see accompanying LICENSE file

include <libbpkg/manifest.hxx>;

include <bpkg/configuration.cli>;

"\section=1"
"\name=bpkg-rep-add"
"\summary=add repository to configuration"

namespace bpkg
{
  {
    "<options> <rep-loc> <tag> <branch> <commit-id>",

    "\h|SYNOPSIS|

     \c{\b{bpkg rep-add}|\b{add} [<options>] <rep-loc>...}

     \h|DESCRIPTION|

     The \cb{rep-add} command adds the specified package repositories to the
     configuration. The repository location <rep-loc> is a URL or a directory
     path. If a repository with the same canonical name already exists in the
     configuration, then its location is replaced with the specified.

     Note that this command doesn't fetch the list of available packages for
     the newly added repository. For that, use the \l{bpkg-rep-fetch(1)}
     command, normally, after adding all the repositories you wish to use.

     Currently three types of repositories are supported: archive-based
     \cb{pkg}, directory-based \cb{dir}, and version control-based \cb{git}.
     See \l{bpkg-repository-types(1)} for details on their structure and URL
     format.

     Normally the repository type can be automatically guessed by examining
     its URL (for example, the presence of the \cb{.git} extension) or, in
     case of a local repository, its content (for example, the presence of the
     \cb{.git/} subdirectory). Without any identifying information the
     \cb{pkg} type is assumed unless explicitly specified with the \cb{--type}
     option or in the URL scheme. Note, however, that the \cb{dir} repository
     type is never guessed since it is not easily distinguishable from local
     \cb{pkg} and \cb{git} repositories.
     "
  }

  class rep_add_options: configuration_options
  {
    "\h|REP-ADD OPTIONS|"

    repository_type --type
    {
      "<type>",
      "Specify the repository type with valid values being \cb{pkg}, \cb{dir},
       and \cb{git}."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bpkg-default-options-files(1)} for an overview of the default
   options files. For the \cb{rep-add} command the search start
   directory is the configuration directory. The following options files are
   searched for in each directory and, if found, loaded in the order listed:

   \
   bpkg.options
   bpkg-rep-add.options
   \

   The following \cb{rep-add} command options cannot be specified in the
   default options files:

   \
   --directory|-d
   \
  "
}