Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .maintain/node-template-release/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "GPL-3.0"
toml = "0.4"
tar = "0.4"
glob = "0.2"
structopt = "0.3"
clap = { version = "3.0", features = ["derive"] }
tempfile = "3"
fs_extra = "1"
git2 = "0.8"
Expand Down
13 changes: 6 additions & 7 deletions .maintain/node-template-release/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use structopt::StructOpt;
use clap::Parser;

use std::{
collections::HashMap,
Expand Down Expand Up @@ -26,13 +26,13 @@ const SUBSTRATE_GIT_URL: &str = "https://github.com/paritytech/substrate.git";

type CargoToml = HashMap<String, toml::Value>;

#[derive(StructOpt)]
#[derive(Parser)]
struct Options {
/// The path to the `node-template` source.
#[structopt(parse(from_os_str))]
#[clap(parse(from_os_str))]
node_template: PathBuf,
/// The path where to output the generated `tar.gz` file.
#[structopt(parse(from_os_str))]
#[clap(parse(from_os_str))]
output: PathBuf,
}

Expand Down Expand Up @@ -209,7 +209,7 @@ fn build_and_test(path: &Path, cargo_tomls: &[PathBuf]) {
}

fn main() {
let options = Options::from_args();
let options = Options::parse();

let build_dir = tempfile::tempdir().expect("Creates temp build dir");

Expand Down Expand Up @@ -261,8 +261,7 @@ fn main() {

// adding root rustfmt to node template build path
let node_template_rustfmt_toml_path = node_template_path.join("rustfmt.toml");
let root_rustfmt_toml =
&options.node_template.join("../../rustfmt.toml");
let root_rustfmt_toml = &options.node_template.join("../../rustfmt.toml");
if root_rustfmt_toml.exists() {
fs::copy(&root_rustfmt_toml, &node_template_rustfmt_toml_path)
.expect("Copying rustfmt.toml.");
Expand Down
Loading