Skip to content

Commit

Permalink
fix: #44
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Aug 14, 2021
1 parent 8e52a04 commit 57f0692
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shadow-rs"
version = "0.6.11"
version = "0.6.12"
authors = ["baoyachi <[email protected]>"]
edition = "2018"
description = "A build-time information stored in your rust project"
Expand Down
2 changes: 0 additions & 2 deletions src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ mod tests {
let env_map = Shadow::get_env();
let map = new_git(Path::new("./"), CiType::Github, &env_map);
for (k, v) in map {
println!("k:{},v:{:?}", k, v);
assert!(!v.desc.is_empty());
if !k.eq(TAG) && !k.eq(BRANCH) && !k.eq(GIT_STATUS_FILE) {
assert!(!v.v.is_empty());
Expand All @@ -458,7 +457,6 @@ mod tests {

//assert github tag always exist value
if let Some(github_ref) = env_map.get("GITHUB_REF") {
println!("github_ref:{}", github_ref);
if github_ref.starts_with("refs/tags/") && k.eq(TAG) {
assert!(!v.v.is_empty());
} else if github_ref.starts_with("refs/heads/") && k.eq(BRANCH) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ impl Shadow {

fn gen_const(&mut self) -> SdResult<()> {
for (k, v) in self.map.clone() {
println!("k:{},v:{:?}", k, v);
println!("cargo:rerun-if-env-changed={}", k);
self.write_const(k, v)?;
}
Ok(())
Expand Down

0 comments on commit 57f0692

Please sign in to comment.