diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-09-29 11:54:13 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-09-29 11:56:21 +0300 |
commit | 205fb9013a3d387478ada8dc30b4da4ec20051a3 (patch) | |
tree | c99725eb9fc450095798443fe6a6bb5b3008c12c /libbrep | |
parent | d3f7242eb9e0476fb0c1d3caf1c6cfdfebab63d1 (diff) |
Add support for *-build-*email package manifest values
Diffstat (limited to 'libbrep')
-rw-r--r-- | libbrep/build-extra.sql | 14 | ||||
-rw-r--r-- | libbrep/build-package.hxx | 4 | ||||
-rw-r--r-- | libbrep/build.hxx | 2 | ||||
-rw-r--r-- | libbrep/build.xml | 2 | ||||
-rw-r--r-- | libbrep/common.hxx | 7 | ||||
-rw-r--r-- | libbrep/package.hxx | 15 | ||||
-rw-r--r-- | libbrep/package.xml | 11 |
7 files changed, 42 insertions, 13 deletions
diff --git a/libbrep/build-extra.sql b/libbrep/build-extra.sql index b1bd04f..9ffbac1 100644 --- a/libbrep/build-extra.sql +++ b/libbrep/build-extra.sql @@ -61,6 +61,12 @@ CREATE FOREIGN TABLE build_package ( version_upstream TEXT NOT NULL, version_release TEXT NULL, project CITEXT NOT NULL, + build_email TEXT NULL, + build_email_comment TEXT NULL, + build_warning_email TEXT NULL, + build_warning_email_comment TEXT NULL, + build_error_email TEXT NULL, + build_error_email_comment TEXT NULL, internal_repository_tenant TEXT NULL, internal_repository_canonical_name TEXT NULL, buildable BOOLEAN NOT NULL) @@ -189,7 +195,13 @@ CREATE FOREIGN TABLE build_package_configs ( index BIGINT NOT NULL, config_name TEXT NOT NULL, config_arguments TEXT NULL, - config_comment TEXT NOT NULL) + config_comment TEXT NOT NULL, + config_email TEXT NULL, + config_email_comment TEXT NULL, + config_warning_email TEXT NULL, + config_warning_email_comment TEXT NULL, + config_error_email TEXT NULL, + config_error_email_comment TEXT NULL) SERVER package_server OPTIONS (table_name 'package_build_configs'); CREATE FOREIGN TABLE build_package_config_builds ( diff --git a/libbrep/build-package.hxx b/libbrep/build-package.hxx index 50294a3..94ffb08 100644 --- a/libbrep/build-package.hxx +++ b/libbrep/build-package.hxx @@ -114,6 +114,10 @@ namespace brep package_name project; + optional<email> build_email; + optional<email> build_warning_email; + optional<email> build_error_email; + // Mapped to the package object requirements and tests members using the // PostgreSQL foreign table mechanism. // diff --git a/libbrep/build.hxx b/libbrep/build.hxx index 717029d..b64b28a 100644 --- a/libbrep/build.hxx +++ b/libbrep/build.hxx @@ -28,7 +28,7 @@ // #define LIBBREP_BUILD_SCHEMA_VERSION_BASE 20 -#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 21, closed) +#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 22, closed) // We have to keep these mappings at the global scope instead of inside the // brep namespace because they need to be also effective in the bbot namespace diff --git a/libbrep/build.xml b/libbrep/build.xml index 0374b05..2ac0002 100644 --- a/libbrep/build.xml +++ b/libbrep/build.xml @@ -1,4 +1,6 @@ <changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="build" version="1"> + <changeset version="22"/> + <changeset version="21"/> <model version="20"> diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 158690e..fec22e8 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -333,6 +333,13 @@ namespace brep #pragma db value(build_constraint) definition + // email + // + using bpkg::email; + + #pragma db value(email) definition + #pragma db member(email::value) virtual(string) before access(this) column("") + // build_package_config // using build_package_config = bpkg::build_package_config; diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 4cbdded..e189339 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -20,7 +20,7 @@ // #define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 27 -#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 27, closed) +#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 28, closed) namespace brep { @@ -72,13 +72,6 @@ namespace brep set(this = brep::manifest_url ((?), "" /* comment */)) \ column("") - // email - // - using bpkg::email; - - #pragma db value(email) definition - #pragma db member(email::value) virtual(string) before access(this) column("") - // licenses // using bpkg::licenses; @@ -527,9 +520,9 @@ namespace brep optional<manifest_url> package_url; optional<email_type> email; optional<email_type> package_email; - optional<email_type> build_email; - optional<email_type> build_warning_email; - optional<email_type> build_error_email; + optional<email_type> build_email; // Note: foreign-mapped in build. + optional<email_type> build_warning_email; // Note: foreign-mapped in build. + optional<email_type> build_error_email; // Note: foreign-mapped in build. dependencies_type dependencies; requirements_type requirements; // Note: foreign-mapped in build. small_vector<test_dependency, 1> tests; // Note: foreign-mapped in build. diff --git a/libbrep/package.xml b/libbrep/package.xml index 98c9055..073fbb6 100644 --- a/libbrep/package.xml +++ b/libbrep/package.xml @@ -1,4 +1,15 @@ <changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="package" version="1"> + <changeset version="28"> + <alter-table name="package_build_configs"> + <add-column name="config_email" type="TEXT" null="true"/> + <add-column name="config_email_comment" type="TEXT" null="true"/> + <add-column name="config_warning_email" type="TEXT" null="true"/> + <add-column name="config_warning_email_comment" type="TEXT" null="true"/> + <add-column name="config_error_email" type="TEXT" null="true"/> + <add-column name="config_error_email_comment" type="TEXT" null="true"/> + </alter-table> + </changeset> + <model version="27"> <table name="tenant" kind="object"> <column name="id" type="TEXT" null="false"/> |