NAME
bdep-publish
– publish project to archive repository
SYNOPSIS
bdep publish [options] [cfg-spec]
[pkg-spec]
pkg-spec = (pkg |
(--directory|-d pkg-dir))... | prj-spec
prj-spec = --directory|-d prj-dir
cfg-spec = (@cfg-name | --config|-c
cfg-dir)... | --all|-a | --forward
DESCRIPTION
The publish
command publishes the project packages to
an archive-based repository.
If no project or package directory is specified, then the current working
directory is assumed. If no configuration is specified, then the default
configurations are used to prepare the package distributions. If the
specified directory is a project directory, then all the packages in the
project are published. See bdep-projects-configs(1)
for details on specifying projects and configurations.
For each specified package the publish
command
prepares a package archive and sends it as part of the package submission
request to an archive-based repository. If the repository is not explicitly
specified with the --repository
option, packages are
published to cppget.org
by default.
Along with the package archive, the submission request specifies the
repository section to publish the package under, the control repository URL
to use for authorization, and the publisher's name and email address for the
record. While the exact usage and interpretation of this information depends
on the specific repository, the following semantics apply when submitting to
cppget.org
.
The section specifies the desired repository section to publish the
project under. If not explicitly specified with the
--section
option, one of the alpha
,
beta
, or stable
values are
automatically derived from the package version.
The control repository URL is a publicly accessible, read-only URL to a
version control repository (normally the same as the project's) that is used
to authenticate the publisher as someone authorized to publish under this
package name (currently only git(1)
is supported).
Prior to sending the submission request, the publish
command adds the package archive checksum to the
build2-control
branch of the project's version control
repository. Upon receiving the submission request, the archive repository
either (1) associates the control repository with the package name if this
is the first time this package name is published or (2) compares the
submitted control repository to the previously associated and, if matching,
queries the build2-control
branch to verify that the
submitter is authorized to publish this archive under this package name.
Unless the control repository URL is specified with the
--control
option, it will be automatically derived from
the version control's "remote" URL. In case of git(1)
,
it will be based on the remote.origin.url
configuration
value unless overridden with
remote.origin.build2ControlUrl
or
remote.origin.build2Url
. The special
none
value to the --control
option
can be used to disable this functionality.
See Package Submission for details on the submission request handling by archive repositories.
If the --forward
option is specified then the
forwarded configurations are used to prepare the package distributions. In
particular, this means that in this mode the project doesn't need to be
initialized and all that's required is for package's source directories to
be configured to forward to an out of source build configuration (see b(1)
for details on
forwarded configurations). This, for example, can be used to publish
packages that don't use the standard version.
PUBLISH OPTIONS
COMMON OPTIONS
The common options are summarized below with a more detailed description
available in bdep-common-options(1)
.
DEFAULT OPTIONS FILES
See bdep-default-options-files(1)
for an overview of the default options files. For the
publish
command the search start directory is the
project directory. The following options files are searched for in each
directory and, if found, loaded in the order listed:
bdep.options bdep-publish.options
The following publish
command options cannot be
specified in the default options files:
--directory|-d
ENVIRONMENT
The BDEP_AUTHOR_NAME
and
BDEP_AUTHOR_EMAIL
environment variables can be used to
specify the publisher's name and email address, respectively. If not set,
the publish
command will first try to obtain the name
and email from the version control system (if used) and then from the
USER
and EMAIL
environment
variables, respectively. See also the --author-name
and
--author-email
options.
BUGS
Send bug reports to the users@build2.org mailing list.