bdep-publish – publish project to archive repository


bdep publish [options] [cfg-spec] [pkg-spec]

pkg-spec = (--directory|-d pkg-dir)... | prj-spec
prj-spec = --directory|-d prj-dir
cfg-spec = (@cfg-name | --config|-c cfg-dir)... | --all|-a | --forward


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 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

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.


Don't prompt for confirmation before publishing.
--control url
Control repository URL for the packages being published.
--repository url
Repository to publish the packages to.
--section name
Repository section to publish the packages under.
--author-name name
Publisher's name. If unspecified, it will be obtained from the environment and/or version control system. See the ENVIRONMENT section for details.
--author-email email
Publisher's email address. If unspecified, it will be obtained from the environment and/or version control system. See the ENVIRONMENT section for details.
--force check
Force publishing, disabling the specified check. Repeat this option to disable multiple checks.
--simulate outcome
Simulate the specified outcome of the submission process without actually performing any externally visible actions (such as publishing the package). The commonly used outcome value is success. For other recognized outcomes refer to the submission service documentation.
Use the forwarded configuration for each package instead of the default configuration.
Use all build configurations.
--config|-c dir
Specify the build configuration as a directory.
--directory|-d dir
Assume project/package is in the specified directory rather than in the current working directory.
--config-name|-n name
Specify the build configuration as a name.
--config-id num
Specify the build configuration as an id.


The common options are summarized below with a more detailed description available in bdep-common-options(1).

Print essential underlying commands being executed.
Print all underlying commands being executed.
Run quietly, only printing error messages.
--verbose level
Set the diagnostics verbosity to level between 0 and 6.
--jobs|-j num
Number of jobs to perform in parallel.
Suppress progress indicators for long-lasting operations, such as network transfers, building, etc.
--bpkg path
The package manager program to be used for build configuration management.
--bpkg-option opt
Additional option to be passed to the package manager program.
--build path
The build program to be used to build packages.
--build-option opt
Additional option to be passed to the build program.
--curl path
The curl program to be used for network operations.
--curl-option opt
Additional option to be passed to the curl program.
--pager path
The pager program to be used to show long text.
--pager-option opt
Additional option to be passed to the pager program.
--options-file file
Read additional options from file.
--default-options dir
The directory to load additional default options files from.
Don't load 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:


The following publish command options cannot be specified in the default options files:



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.


Send bug reports to the mailing list.