Browse Source

Use OUT_DIR

relay-external-protocol
Tony Garnock-Jones 5 months ago
parent
commit
4b872828a5
  1. 1
      .gitignore
  2. 6
      build.rs
  3. 1
      src/.gitignore
  4. 1
      src/schemas/mod.rs

1
.gitignore

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

6
build.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

@ -1 +0,0 @@
schemas/

1
src/schemas/mod.rs

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