diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-28 16:46:06 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-28 16:46:06 +0300 |
commit | 0de08dc04a93585d5279a71ea3fd6dd59cbbead8 (patch) | |
tree | c8178ccdda3e06b04d0d51d2699261a6b22fecd4 | |
parent | 241afb3b9982d9c6d836b6dbbcef10418d80299c (diff) |
Switch to version module
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | brep/.gitignore | 2 | ||||
-rw-r--r-- | brep/buildfile | 9 | ||||
-rw-r--r-- | brep/utility | 2 | ||||
-rw-r--r-- | brep/version | 52 | ||||
-rw-r--r-- | brep/version.in | 52 | ||||
-rw-r--r-- | build/bootstrap.build | 17 | ||||
-rw-r--r-- | buildfile | 8 | ||||
-rw-r--r-- | load/load.cxx | 1 | ||||
-rw-r--r-- | manifest | 12 | ||||
-rw-r--r-- | migrate/migrate.cxx | 1 | ||||
-rw-r--r-- | mod/mod-package-search.cxx | 1 | ||||
-rw-r--r-- | mod/mod-repository-root.cxx | 2 | ||||
-rw-r--r-- | version | 1 |
14 files changed, 78 insertions, 86 deletions
@@ -11,3 +11,7 @@ *.exe *.exe.dlls/ *.exe.manifest + +# Generated version. +# +version diff --git a/brep/.gitignore b/brep/.gitignore index 9852519..1e5e1f9 100644 --- a/brep/.gitignore +++ b/brep/.gitignore @@ -6,3 +6,5 @@ package-extra build-odb* build.sql + +version diff --git a/brep/buildfile b/brep/buildfile index aeb1848..2da0281 100644 --- a/brep/buildfile +++ b/brep/buildfile @@ -31,13 +31,16 @@ lib{brep}: \ $int_libs \ sql{build package package-extra} +hxx{version}: in{version} $src_root/file{manifest} +hxx{version}: dist = true + # For pre-releases use the complete version to make sure they cannot be used # in place of another pre-release or the final version. # -if $abi_prerelease - lib{brep}: bin.lib.version = @-$version +if $version.pre_release + lib{brep}: bin.lib.version = @"-$version.project_id" else - lib{brep}: bin.lib.version = @-$abi_major.$abi_minor + lib{brep}: bin.lib.version = @"-$version.major.$version.minor" lib{brep}: cxx.export.poptions = "-I$out_root" "-I$src_root" lib{brep}: cxx.export.libs = $int_libs diff --git a/brep/utility b/brep/utility index b359fc6..3c6f5a2 100644 --- a/brep/utility +++ b/brep/utility @@ -29,4 +29,6 @@ namespace brep using butl::reverse_iterate; } +#include <brep/version> + #endif // BREP_UTILITY diff --git a/brep/version b/brep/version deleted file mode 100644 index e1db981..0000000 --- a/brep/version +++ /dev/null @@ -1,52 +0,0 @@ -// file : brep/version -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BREP_VERSION // Note: using the version macro itself. - -#include <butl/version> // LIBBUTL_VERSION -#include <bpkg/version> // LIBBPKG_VERSION -#include <bbot/version> // LIBBBOT_VERSION - -// Version format is AABBCCDD where -// -// AA - major version number -// BB - minor version number -// CC - bugfix version number -// DD - alpha / beta (DD + 50) version number -// -// When DD is not 00, 1 is subtracted from AABBCC. For example: -// -// Version AABBCCDD -// 2.0.0 02000000 -// 2.1.0 02010000 -// 2.1.1 02010100 -// 2.2.0-a1 02019901 -// 3.0.0-b2 02999952 -// -#define BREP_VERSION 49901 -#define BREP_VERSION_STR "0.5.0-a1" - -// For now these are the same. -// -#define LIBBREP_VERSION BREP_VERSION -#define LIBBREP_VERSION_STR BREP_VERSION_STR - -// Generally, we expect minor versions to be source code backwards- -// compatible, thought we might have a minimum version requirement. -// -// Note: does not apply during early development. -// -#if LIBBUTL_VERSION != 49901 -# error incompatible libbutl version -#endif - -#if LIBBPKG_VERSION != 49901 -# error incompatible libbpkg version -#endif - -#if LIBBBOT_VERSION != 49901 -# error incompatible libbbot version -#endif - -#endif // BREP_VERSION diff --git a/brep/version.in b/brep/version.in new file mode 100644 index 0000000..25a4b5a --- /dev/null +++ b/brep/version.in @@ -0,0 +1,52 @@ +// file : brep/version.in -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BREP_VERSION // Note: using the version macro itself. + +// Note: using build2 standard versioning scheme. The numeric version format +// is AAABBBCCCDDDE where: +// +// AAA - major version number +// BBB - minor version number +// CCC - bugfix version number +// DDD - alpha / beta (DDD + 500) version number +// E - final (0) / snapshot (1) +// +// When DDDE is not 0, 1 is subtracted from AAABBBCCC. For example: +// +// Version AAABBBCCCDDDE +// +// 0.1.0 0000010000000 +// 0.1.2 0000010010000 +// 1.2.3 0010020030000 +// 2.2.0-a.1 0020019990010 +// 3.0.0-b.2 0029999995020 +// 2.2.0-a.1.z 0020019990011 +// +#define BREP_VERSION $brep.version.project_number$ULL +#define BREP_VERSION_STR "$brep.version.project$" +#define BREP_VERSION_ID "$brep.version.project_id$" + +#define BREP_VERSION_MAJOR $brep.version.major$ +#define BREP_VERSION_MINOR $brep.version.minor$ +#define BREP_VERSION_PATCH $brep.version.patch$ + +#define BREP_PRE_RELEASE $brep.version.pre_release$ + +#define BREP_SNAPSHOT $brep.version.snapshot_sn$ULL +#define BREP_SNAPSHOT_ID "$brep.version.snapshot_id$" + +#include <butl/version> + +$libbutl.check(LIBBUTL_VERSION, LIBBUTL_SNAPSHOT)$ + +#include <bpkg/version> + +$libbpkg.check(LIBBPKG_VERSION, LIBBPKG_SNAPSHOT)$ + +#include <bbot/version> + +$libbbot.check(LIBBBOT_VERSION, LIBBBOT_SNAPSHOT)$ + +#endif // BREP_VERSION diff --git a/build/bootstrap.build b/build/bootstrap.build index 28d48ce..2e21204 100644 --- a/build/bootstrap.build +++ b/build/bootstrap.build @@ -4,22 +4,7 @@ project = brep -using build@0.4.0 - -version = 0.5.0-a1 - -abi_major = 0 -abi_minor = 5 -abi_patch = 0 -abi_prerelease = true - -revision = 0 - -dist.package = $project-$version - -if ($revision != 0) - dist.package += +$revision - +using version using config using dist using test @@ -2,9 +2,11 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -d = brep/ mod/ load/ migrate/ tests/ www/ doc/ etc/ -./: $d doc{INSTALL INSTALL-DEV LICENSE NEWS README version} file{manifest} -include $d +./: brep/ mod/ load/ migrate/ tests/ www/ doc/ etc/ \ + doc{INSTALL INSTALL-DEV LICENSE NEWS README version} file{manifest} + +doc{version}: file{manifest} # Generated by the version module. +doc{version}: dist = true # Don't install tests or the INSTALL* files. # diff --git a/load/load.cxx b/load/load.cxx index eabe547..3e9526f 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -29,7 +29,6 @@ #include <brep/types> #include <brep/utility> -#include <brep/version> #include <brep/package> #include <brep/package-odb> @@ -1,6 +1,6 @@ : 1 name: brep -version: 0.5.0-a1 +version: 0.5.0-b.0.z summary: build2 package repository web interface license: MIT tags: build2, c++, package, repository, web, interface, apache, module @@ -12,14 +12,14 @@ build-email: builds@build2.org requires: c++14 requires: postgresql >= 9.0 requires: apache2; Including development files (httpd.h header, etc). -depends: * build2 >= 0.4.0 -depends: * bpkg >= 0.4.0 +depends: * build2 >= 0.5.0- +depends: * bpkg >= 0.5.0- # @@ Should probably become conditional dependency. requires: ? cli ; Only required if changing .cli files. depends: libapr1 depends: libstudxml >= 1.1.0-a4 depends: libodb >= 2.5.0-a10 depends: libodb-pgsql >= 2.5.0-a10 -depends: libbutl == 0.5.0-a1 -depends: libbpkg == 0.5.0-a1 -depends: libbbot == 0.5.0-a1 +depends: libbutl [0.5.0-b.0.1 0.5.0-b.1) +depends: libbpkg [0.5.0-b.0.1 0.5.0-b.1) +depends: libbbot [0.5.0-b.0.1 0.5.0-b.1) diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index c700efe..e785531 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -17,7 +17,6 @@ #include <brep/types> #include <brep/utility> -#include <brep/version> #include <brep/database-lock> diff --git a/mod/mod-package-search.cxx b/mod/mod-package-search.cxx index 4988d42..6d73a69 100644 --- a/mod/mod-package-search.cxx +++ b/mod/mod-package-search.cxx @@ -15,7 +15,6 @@ #include <web/module> #include <web/mime-url-encoding> -#include <brep/version> #include <brep/package> #include <brep/package-odb> diff --git a/mod/mod-repository-root.cxx b/mod/mod-repository-root.cxx index d8d7c64..097c874 100644 --- a/mod/mod-repository-root.cxx +++ b/mod/mod-repository-root.cxx @@ -8,8 +8,6 @@ #include <web/module> -#include <brep/version> - #include <mod/module> #include <mod/options> #include <mod/mod-build-log> diff --git a/version b/version deleted file mode 100644 index d1f4eb1..0000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -0.5.0-a1 |