-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
47 lines (36 loc) · 863 Bytes
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[env.development]
BUILD_ARGS = "--all-features"
BUILD_DIR = "target/debug"
[env.production]
BUILD_ARGS = "--all-features --release"
BUILD_DIR = "target/release"
[tasks.build]
toolchain = "nightly"
command = "cargo"
args = ["build", "@@split(BUILD_ARGS, )"]
[tasks.test]
toolchain = "nightly"
[tasks.format]
disabled = true
[tasks.post-build]
script_runner = "@rust"
script = [
'''
//! ```cargo
//! [dependencies]
//! fs_extra = "*"
//! ```
extern crate fs_extra;
use fs_extra::dir;
use std::fs;
use std::env;
fn main() {
let build_dir = env::var("BUILD_DIR").unwrap();
fs::copy("config.yml", format!("{}/config.yml", build_dir)).unwrap();
let mut options = dir::CopyOptions::new();
options.overwrite = true;
dir::create_all(format!("{}/roms", build_dir), true).unwrap();
dir::copy("roms", build_dir, &options).unwrap();
}
'''
]