From 1b76b443a64b94a4901188587c128fdc461baf48 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 20 Jun 2016 13:19:54 +0200 Subject: Add stub for repository-signing help topic --- bpkg/.gitignore | 2 ++ bpkg/bpkg.cli | 5 +++++ bpkg/buildfile | 9 +++++++++ bpkg/help.cxx | 11 ++++++++++- bpkg/repository-signing.cli | 19 +++++++++++++++++++ doc/cli.sh | 3 ++- 6 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 bpkg/repository-signing.cli diff --git a/bpkg/.gitignore b/bpkg/.gitignore index 38ecb79..782196c 100644 --- a/bpkg/.gitignore +++ b/bpkg/.gitignore @@ -3,3 +3,5 @@ bpkg *-options.?xx *-odb *-odb.?xx +repository-signing +repository-signing.cxx diff --git a/bpkg/bpkg.cli b/bpkg/bpkg.cli index 13299b3..86f1b89 100644 --- a/bpkg/bpkg.cli +++ b/bpkg/bpkg.cli @@ -260,6 +260,11 @@ namespace bpkg { "\l{bpkg-common-options(1)} \- details on common options" } + + bool repository-signing + { + "\l{bpkg-repository-signing(1)} \- how to sign repository" + } }; class options: common_options diff --git a/bpkg/buildfile b/bpkg/buildfile index 5067780..b59783b 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -45,6 +45,7 @@ exe{bpkg}: \ {hxx cxx}{ rep-create } {hxx ixx cxx}{ rep-create-options } \ {hxx cxx}{ rep-fetch } {hxx ixx cxx}{ rep-fetch-options } \ {hxx cxx}{ rep-info } {hxx ixx cxx}{ rep-info-options } \ + {hxx cxx}{ repository-signing } \ {hxx cxx}{ satisfaction } \ {hxx }{ types } \ {hxx cxx}{ types-parsers } \ @@ -103,6 +104,10 @@ if! $cli.loaded {hxx ixx cxx}{rep-info-options}: cli{rep-info} {hxx ixx cxx}{rep-create-options}: cli{rep-create} +# Help topics. +# +{hxx cxx}{repository-signing}: cli{repository-signing} + # Option length must be the same to get commands/topics/options aligned. # cli.options += -I $src_root --include-with-brackets --include-prefix bpkg \ @@ -116,6 +121,10 @@ cli.cxx{bpkg-options}: cli.options += --short-usage --suppress-undocumented cli.options += --long-usage # All other pages -- long usage. +# Avoid generating CLI runtime and empty inline file for help topics. +# +cli.cxx{repository-signing}: cli.options += --suppress-cli --suppress-inline + # Include generated cli files into the distribution. # hxx{*-options}: dist = true diff --git a/bpkg/help.cxx b/bpkg/help.cxx index 8713426..cf496ca 100644 --- a/bpkg/help.cxx +++ b/bpkg/help.cxx @@ -9,6 +9,10 @@ #include #include +// Help topics. +// +#include + using namespace std; using namespace butl; @@ -21,8 +25,13 @@ namespace bpkg { if (t.empty ()) // General help. usage = &print_bpkg_usage; - else if (t == "common-options") // Help topics. + // + // Help topics. + // + else if (t == "common-options") usage = &print_bpkg_common_options_long_usage; + else if (t == "repository-signing") + usage = &print_bpkg_repository_signing_usage; else fail << "unknown bpkg command/help topic '" << t << "'" << info << "run 'bpkg help' for more information"; diff --git a/bpkg/repository-signing.cli b/bpkg/repository-signing.cli new file mode 100644 index 0000000..b2b538a --- /dev/null +++ b/bpkg/repository-signing.cli @@ -0,0 +1,19 @@ +// file : bpkg/repository-signing.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-repository-signing" +"\summary=how to sign repository" + +" +\h|SYNOPSIS| + +\c{\b{bpkg rep-create --key} ...} + +\h|DESCRIPTION| + +TODO +" diff --git a/doc/cli.sh b/doc/cli.sh index a5c5fe0..d69578f 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -56,7 +56,8 @@ compile "bpkg" $o --output-prefix "" --suppress-undocumented --class-doc bpkg::c pages="cfg-create help pkg-build pkg-clean pkg-configure pkg-disfigure \ pkg-drop pkg-fetch pkg-install pkg-purge pkg-status pkg-test pkg-uninstall \ -pkg-unpack pkg-update pkg-verify rep-add rep-create rep-fetch rep-info" +pkg-unpack pkg-update pkg-verify rep-add rep-create rep-fetch rep-info \ +repository-signing" for p in $pages; do compile $p $o -- cgit v1.1