Use OUT_DIR

relay-external-protocol
Tony Garnock-Jones 1 year ago
parent 945a9fc7f7
commit 4b872828a5

1
.gitignore vendored

@ -1,4 +1,3 @@
/target
**/*.rs.bk
scratch/
src/schemas/**/*.rs

@ -1,9 +1,7 @@
use preserves_schema::compiler::*;
use std::io::Error;
fn main() -> Result<(), Error> {
let buildroot = std::env::current_dir()?;
fn main() -> std::io::Result<()> {
let buildroot = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
let mut gen_dir = buildroot.clone();
gen_dir.push("src/schemas");

1
src/.gitignore vendored

@ -1 +0,0 @@
schemas/

@ -0,0 +1 @@
include!(concat!(env!("OUT_DIR"), "/src/schemas/mod.rs"));
Loading…
Cancel
Save