add doc-only substrate entry point crate (#14581)

* add doc-only substrate entry point crate

* document a few more things

* add more

* fix width

* Update primitives/io/src/lib.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* add link

* update cargo toml file

* fix sp-io docs

* improve

* small update

* add license

* satisfy license job

* add a line about FRAME

* CI happy now

* make CI more happy

* Let the check run for the whole workspace

* Forward the substrate node again as default run

* update binary names

* upate verison test

* Fix fix fix

* Fix

* rename to substrate-node in more places

* Revert "rename to substrate-node in more places"

This reverts commit 66960f84a1b6f1f7c638b4040e28e9fbabb8adf5.

* fix

* Fix build pipeline

* Fix properly plus add some docs

---------

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Kian Paimani
2023-07-19 20:36:50 +02:00
committed by GitHub
parent bc84e1b838
commit 817c97d65d
36 changed files with 1084 additions and 52 deletions
+5 -5
View File
@@ -21,17 +21,17 @@ use regex::Regex;
use std::process::Command;
fn expected_regex() -> Regex {
Regex::new(r"^substrate (.+)-([a-f\d]+)$").unwrap()
Regex::new(r"^substrate-node (.+)-([a-f\d]+)$").unwrap()
}
#[test]
fn version_is_full() {
let expected = expected_regex();
let output = Command::new(cargo_bin("substrate")).args(&["--version"]).output().unwrap();
let output = Command::new(cargo_bin("substrate-node")).args(&["--version"]).output().unwrap();
assert!(output.status.success(), "command returned with non-success exit code");
let output = String::from_utf8_lossy(&output.stdout).trim().to_owned();
let output = dbg!(String::from_utf8_lossy(&output.stdout).trim().to_owned());
let captures = expected.captures(output.as_str()).expect("could not parse version in output");
assert_eq!(&captures[1], env!("CARGO_PKG_VERSION"));
@@ -41,11 +41,11 @@ fn version_is_full() {
fn test_regex_matches_properly() {
let expected = expected_regex();
let captures = expected.captures("substrate 2.0.0-da487d19d").unwrap();
let captures = expected.captures("substrate-node 2.0.0-da487d19d").unwrap();
assert_eq!(&captures[1], "2.0.0");
assert_eq!(&captures[2], "da487d19d");
let captures = expected.captures("substrate 2.0.0-alpha.5-da487d19d").unwrap();
let captures = expected.captures("substrate-node 2.0.0-alpha.5-da487d19d").unwrap();
assert_eq!(&captures[1], "2.0.0-alpha.5");
assert_eq!(&captures[2], "da487d19d");
}