foundry_common/version.rs
1//! Foundry version information.
2
3/// The SemVer compatible version information for Foundry.
4pub const SEMVER_VERSION: &str = env!("FOUNDRY_SEMVER_VERSION");
5
6/// The short version message information for the Foundry CLI.
7pub const SHORT_VERSION: &str = env!("FOUNDRY_SHORT_VERSION");
8
9/// The long version message information for the Foundry CLI.
10pub const LONG_VERSION: &str = concat!(
11 env!("FOUNDRY_LONG_VERSION_0"),
12 "\n",
13 env!("FOUNDRY_LONG_VERSION_1"),
14 "\n",
15 env!("FOUNDRY_LONG_VERSION_2"),
16 "\n",
17 env!("FOUNDRY_LONG_VERSION_3"),
18);
19
20/// Whether the version is a nightly build.
21pub const IS_NIGHTLY_VERSION: bool = option_env!("FOUNDRY_IS_NIGHTLY_VERSION").is_some();
22
23/// The warning message for nightly versions.
24pub const NIGHTLY_VERSION_WARNING_MESSAGE: &str =
25 "This is a nightly build of Foundry. It is recommended to use the latest stable version. \
26 Visit https://book.getfoundry.sh/announcements for more information. \n\
27 To mute this warning set `FOUNDRY_DISABLE_NIGHTLY_WARNING` in your environment. \n";