1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-23 19:23:20 +00:00

Set the cargo version and allow changing it during build time with BWRS_VERSION.

Also renamed GIT_VERSION because that's not the only source anymore.
This commit is contained in:
Daniel García 2020-03-22 16:13:34 +01:00
commit 7a6a3e4160
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
3 changed files with 15 additions and 7 deletions

View file

@ -51,7 +51,7 @@ const COOKIE_NAME: &str = "BWRS_ADMIN";
const ADMIN_PATH: &str = "/admin";
const BASE_TEMPLATE: &str = "admin/base";
const VERSION: Option<&str> = option_env!("GIT_VERSION");
const VERSION: Option<&str> = option_env!("BWRS_VERSION");
fn admin_path() -> String {
format!("{}{}", CONFIG.domain_path(), ADMIN_PATH)

View file

@ -88,7 +88,7 @@ fn main() {
fn parse_args() {
let opt = Opt::from_args();
if opt.version {
if let Some(version) = option_env!("GIT_VERSION") {
if let Some(version) = option_env!("BWRS_VERSION") {
println!("bitwarden_rs {}", version);
} else {
println!("bitwarden_rs (Version info from Git not present)");
@ -101,7 +101,7 @@ fn launch_info() {
println!("/--------------------------------------------------------------------\\");
println!("| Starting Bitwarden_RS |");
if let Some(version) = option_env!("GIT_VERSION") {
if let Some(version) = option_env!("BWRS_VERSION") {
println!("|{:^68}|", format!("Version {}", version));
}