From 62a461ae15fe78193015fe7e34458d1bf31bf455 Mon Sep 17 00:00:00 2001 From: Nils Domrose Date: Thu, 30 May 2019 22:19:58 +0200 Subject: [PATCH] remove syslog from ci, make features flag more clear --- azure-pipelines.yml | 4 ++-- src/main.rs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index be0a9cd..30a7ebf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,8 +18,8 @@ steps: cargo -V displayName: Query rust and cargo versions -- script : cargo build --features "sqlite enable_syslog" +- script : cargo build --features "sqlite" displayName: 'Build project with sqlite backend' -- script : cargo build --features "mysql enable_syslog" +- script : cargo build --features "mysql" displayName: 'Build project with mysql backend' diff --git a/src/main.rs b/src/main.rs index efdc967..4ff6c62 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,6 +48,9 @@ fn main() { #[cfg(all(feature = "sqlite", feature = "mysql"))] compile_error!("Can't enable both backends"); + #[cfg(not(any(feature = "sqlite", feature = "mysql")))] + compile_error!("You need to enable one DB backend. To build with previous defaults do: cargo build --features sqlite"); + check_db(); check_rsa_keys(); check_web_vault();