From 5c8a8e4801a31e4d675d85b8708b60b54c066823 Mon Sep 17 00:00:00 2001 From: baoyachi Date: Wed, 20 Jan 2021 23:54:57 +0800 Subject: [PATCH] update --- src/git.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/git.rs b/src/git.rs index c14ae81..1e9632b 100644 --- a/src/git.rs +++ b/src/git.rs @@ -256,7 +256,7 @@ mod tests { for (k, v) in map { println!("k:{},v:{:?}", k, v); assert!(!v.desc.is_empty()); - if !k.eq(TAG) { + if !k.eq(TAG) || k.eq(BRANCH) { assert!(!v.v.is_empty()); continue; } @@ -265,6 +265,8 @@ mod tests { if let Some(github_ref) = env_map.get("GITHUB_REF") { if github_ref.starts_with("refs/tags/") { assert!(!v.v.is_empty()); + } else if github_ref.starts_with("refs/heads/") { + assert!(!v.v.is_empty()); } } }