Skip to content

Commit

Permalink
fix(doc): Don't rebuild gluon_doc when used outside of the gluon repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Jul 6, 2018
1 parent 78880eb commit 3da6c63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::env;
use std::path::Path;
use std::process::Command;

fn main() {
Expand All @@ -10,6 +11,9 @@ fn main() {
let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
}
// This is the closest thing to making sure we rebuild this every time a new commit is made
println!("cargo:rerun-if-changed=../.git/COMMIT_EDITMSG");
let git_edit_msg = "../.git/COMMIT_EDITMSG";
if Path::new(git_edit_msg).exists() {
// This is the closest thing to making sure we rebuild this every time a new commit is made
println!("cargo:rerun-if-changed={}", git_edit_msg);
}
}

0 comments on commit 3da6c63

Please sign in to comment.