This commit is contained in:
Nathan Sobo 2023-05-24 09:21:50 -06:00
parent 6368ade1da
commit 8abaf66602

View file

@ -3,12 +3,15 @@ use std::env;
use lazy_static::lazy_static;
lazy_static! {
pub static ref RELEASE_CHANNEL_NAME: String = if cfg!(debug_assertions) {
env::var("ZED_RELEASE_CHANNEL")
.unwrap_or_else(|_| include_str!("../../zed/RELEASE_CHANNEL").to_string())
} else {
include_str!("../../zed/RELEASE_CHANNEL").to_string()
};
// TODO: Put this back!
pub static ref RELEASE_CHANNEL_NAME: String = env::var("ZED_RELEASE_CHANNEL")
.unwrap_or_else(|_| include_str!("../../zed/RELEASE_CHANNEL").to_string());
// pub static ref RELEASE_CHANNEL_NAME: String = if cfg!(debug_assertions) {
// env::var("ZED_RELEASE_CHANNEL")
// .unwrap_or_else(|_| include_str!("../../zed/RELEASE_CHANNEL").to_string())
// } else {
// include_str!("../../zed/RELEASE_CHANNEL").to_string()
// };
pub static ref RELEASE_CHANNEL: ReleaseChannel = match RELEASE_CHANNEL_NAME.as_str() {
"dev" => ReleaseChannel::Dev,
"preview" => ReleaseChannel::Preview,