From 2b4dd6f137730abe48506affbe5c8f36a86772fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Wed, 28 Apr 2021 21:46:20 +0200 Subject: [PATCH] Fix branch name --- build.rs | 2 +- src/api/admin.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index bce425e8..39c16095 100644 --- a/build.rs +++ b/build.rs @@ -58,7 +58,7 @@ fn read_git_info() -> Result<(), std::io::Error> { // Combined version let version = if let Some(exact) = exact_tag { exact - } else if &branch != "master" { + } else if &branch != "main" && &branch != "master" { format!("{}-{} ({})", last_tag, rev_short, branch) } else { format!("{}-{}", last_tag, rev_short) diff --git a/src/api/admin.rs b/src/api/admin.rs index 407c96b2..6e168e7a 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -522,7 +522,7 @@ fn diagnostics(_token: AdminToken, ip_header: IpHeader, conn: DbConn) -> ApiResu Ok(r) => r.tag_name, _ => "-".to_string(), }, - match get_github_api::("https://api.github.com/repos/dani-garcia/vaultwarden/commits/master") { + match get_github_api::("https://api.github.com/repos/dani-garcia/vaultwarden/commits/main") { Ok(mut c) => { c.sha.truncate(8); c.sha