File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ use std::process::Command;
10
10
extern crate embed_resource;
11
11
12
12
fn main ( ) {
13
+ // Ensures that env vars are refreshed on any `src/` or `resources/` change, which is
14
+ // required for `.ps.ark.version()` to work as you'd expect. Notably this also ensures
15
+ // changes to `src/debug.c` force a refresh, which otherwise aren't considered by
16
+ // cargo's defaults as requiring a rebuild.
17
+ println ! ( "cargo:rerun-if-changed=src" ) ;
18
+ println ! ( "cargo:rerun-if-changed=resources" ) ;
19
+
13
20
// Attempt to use `git rev-parse HEAD` to get the current git hash. If this
14
21
// fails, we'll just use the string "<unknown>" to indicate that the git hash
15
22
// could not be determined..
@@ -60,6 +67,5 @@ fn main() {
60
67
. join ( "ark-manifest.rc" ) ;
61
68
embed_resource:: compile_for_everything ( resource, embed_resource:: NONE ) ;
62
69
63
- println ! ( "cargo:rerun-if-changed=src/debug.c" ) ;
64
70
cc:: Build :: new ( ) . file ( "src/debug.c" ) . compile ( "debug" ) ;
65
71
}
You can’t perform that action at this time.
0 commit comments