From 61adcbd5ca83762c02cfa421e09fbd65c52b6da9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 9 Mar 2018 14:02:32 +0300 Subject: Fix up package manifest version for pkg-unpack --- bpkg/manifest-utility.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bpkg/manifest-utility.hxx') diff --git a/bpkg/manifest-utility.hxx b/bpkg/manifest-utility.hxx index f608858..ee73c4a 100644 --- a/bpkg/manifest-utility.hxx +++ b/bpkg/manifest-utility.hxx @@ -74,6 +74,21 @@ namespace bpkg // bool repository_name (const string&); + + // Return the version of a package as provided by the build2 version module. + // Return nullopt if the version module is disabled for the package (or the + // build2 project directory doesn't contain the manifest file). Fail if the + // directory is not a build2 project. + // + // Note that if the package directory is under the version control, then the + // resulting version may be populated with the snapshot information (see + // libbutl/standard-version.mxx for more details). Thus, this function can + // be used for fixing up the package manifest version. + // + class common_options; + + optional + package_version (const common_options&, const dir_path&); } #endif // BPKG_MANIFEST_UTILITY_HXX -- cgit v1.1