Merge pull request #469 from LnL7/cargo-workspace
introduce cargo workspace
This commit is contained in:
commit
b4afb127df
8
ofborg/Cargo.lock → Cargo.lock
generated
8
ofborg/Cargo.lock → Cargo.lock
generated
|
@ -461,6 +461,14 @@ dependencies = [
|
||||||
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ofborg-simple-build"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ofborg 0.1.8",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl"
|
name = "openssl"
|
||||||
version = "0.9.24"
|
version = "0.9.24"
|
12
Cargo.toml
Normal file
12
Cargo.toml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[workspace]
|
||||||
|
members = [
|
||||||
|
"ofborg",
|
||||||
|
"ofborg-simple-build"
|
||||||
|
]
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
debug = true
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
#hubcaps = { path = "../hubcaps" }
|
||||||
|
#amq-proto = { path = "rust-amq-proto" }
|
10
ofborg-simple-build/Cargo.toml
Normal file
10
ofborg-simple-build/Cargo.toml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[package]
|
||||||
|
name = "ofborg-simple-build"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Daiderd Jordan <daiderd@gmail.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
ofborg = { path = "../ofborg" }
|
||||||
|
|
||||||
|
log = "0.3.8"
|
|
@ -1,18 +1,22 @@
|
||||||
use ofborg::config;
|
#[macro_use]
|
||||||
use ofborg::nix;
|
extern crate log;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
fn main() {
|
use ofborg::config;
|
||||||
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
use ofborg::nix;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
ofborg::setup_log();
|
ofborg::setup_log();
|
||||||
|
|
||||||
|
log::info!("Loading config...");
|
||||||
|
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
||||||
let nix = cfg.nix();
|
let nix = cfg.nix();
|
||||||
|
|
||||||
|
log::info!("Running build...");
|
||||||
match nix.safely_build_attrs(
|
match nix.safely_build_attrs(
|
||||||
&Path::new("./"),
|
&Path::new("./"),
|
||||||
nix::File::DefaultNixpkgs,
|
nix::File::DefaultNixpkgs,
|
|
@ -28,10 +28,3 @@ nom = "4.0.0-beta3"
|
||||||
sys-info = "0.5.6"
|
sys-info = "0.5.6"
|
||||||
chrono = "0.4.6"
|
chrono = "0.4.6"
|
||||||
separator = "0.4.1"
|
separator = "0.4.1"
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
debug = true
|
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
#hubcaps = { path = "../hubcaps" }
|
|
||||||
#amq-proto = { path = "rust-amq-proto" }
|
|
||||||
|
|
Loading…
Reference in a new issue