From 13b95d383eb9f4f4a5102e0ada7b4e7b4d122b61 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Mon, 8 Apr 2024 22:46:35 +0100 Subject: [PATCH] fix: import std::env in config --- crates/core/config/src/lib.rs | 3 +++ scripts/publish-debug-image.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 scripts/publish-debug-image.sh diff --git a/crates/core/config/src/lib.rs b/crates/core/config/src/lib.rs index abaa5177..2cb6509c 100644 --- a/crates/core/config/src/lib.rs +++ b/crates/core/config/src/lib.rs @@ -6,6 +6,9 @@ use futures_locks::RwLock; use once_cell::sync::Lazy; use serde::Deserialize; +#[cfg(not(debug_assertions))] +use std::env; + static CONFIG_BUILDER: Lazy> = Lazy::new(|| { RwLock::new({ let mut builder = Config::builder().add_source(File::from_str( diff --git a/scripts/publish-debug-image.sh b/scripts/publish-debug-image.sh old mode 100644 new mode 100755 index 9c361f50..6fd3622c --- a/scripts/publish-debug-image.sh +++ b/scripts/publish-debug-image.sh @@ -11,7 +11,7 @@ echo "[profile.release]" >> Cargo.toml echo "debug = true" >> Cargo.toml TAG=$1-debug -echo "Building images, will tag for ghcr.io with $TAG-debug!" +echo "Building images, will tag for ghcr.io with $TAG!" docker build -t ghcr.io/revoltchat/base:latest -f Dockerfile.useCurrentArch . docker build -t ghcr.io/revoltchat/server:$TAG - < crates/delta/Dockerfile docker build -t ghcr.io/revoltchat/bonfire:$TAG - < crates/bonfire/Dockerfile