test-utils/chain-spec-builder: Add note to run builder in release mode (#3958)

This commit is contained in:
Max Inden
2019-10-29 20:41:43 +01:00
committed by Bastian Köcher
parent de711ac188
commit 6ee284ec5e
3 changed files with 31 additions and 0 deletions
@@ -3,6 +3,7 @@ name = "chain-spec-builder"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
build = "build.rs"
[dependencies]
ansi_term = "0.12.1"
@@ -0,0 +1,23 @@
// Copyright 2019 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Substrate is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use std::env;
fn main() {
if let Ok(profile) = env::var("PROFILE") {
println!("cargo:rustc-cfg=build_type=\"{}\"", profile);
}
}
@@ -207,6 +207,13 @@ fn print_seeds(
}
fn main() -> Result<(), String> {
#[cfg(build_type="debug")]
println!(
"The chain spec builder builds a chain specification that includes a Substrate runtime compiled as WASM. To \
ensure proper functioning of the included runtime compile (or run) the chain spec builder binary in \
`--release` mode.\n",
);
let builder = ChainSpecBuilder::from_args();
let chain_spec_path = builder.chain_spec_path().to_path_buf();