Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'parity/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
expenses committed Feb 7, 2020
2 parents d9c20f7 + 4c34b64 commit ad1dfb1
Show file tree
Hide file tree
Showing 110 changed files with 1,610 additions and 890 deletions.
12 changes: 2 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ variables:
only:
- master
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- /^pre-v[0-9]+\.[0-9]+-[0-9a-f]+$/
- web


Expand Down Expand Up @@ -235,15 +236,6 @@ check-web-wasm:
- time cargo build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown
- sccache -s

node-exits:
stage: test
<<: *docker-env
except:
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- ./.maintain/check_for_exit.sh


test-full-crypto-feature:
stage: test
<<: *docker-env
Expand Down Expand Up @@ -524,7 +516,7 @@ publish-gh-doc:
insteadOf = "https://github.com/"
EOC
- unset GITHUB_TOKEN
- git clone https://github.com/substrate-developer-hub/rustdocs.git
- git clone --depth 1 https://github.com/substrate-developer-hub/rustdocs.git
- rsync -ax --delete ./crate-docs/ ./rustdocs/${CI_COMMIT_REF_NAME}/
- cd ./rustdocs; git add .
- git commit -m "update rustdoc ${CI_COMMIT_REF_NAME}"
Expand Down
16 changes: 0 additions & 16 deletions .maintain/check_for_exit.sh

This file was deleted.

16 changes: 13 additions & 3 deletions .maintain/node-template-release/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use structopt::StructOpt;

use std::{
path::{PathBuf, Path}, collections::HashMap, fs::{File, self}, io::{Read, Write},
path::{PathBuf, Path}, collections::HashMap, fs::{File, OpenOptions, self}, io::{Read, Write},
process::Command
};

Expand Down Expand Up @@ -88,7 +88,7 @@ fn replace_path_dependencies_with_git(cargo_toml_path: &Path, commit_id: &str, c
// remove `Cargo.toml`
cargo_toml_path.pop();

for &table in &["dependencies", "build-dependencies"] {
for &table in &["dependencies", "build-dependencies", "dev-dependencies"] {
let mut dependencies: toml::value::Table = match cargo_toml
.remove(table)
.and_then(|v| v.try_into().ok()) {
Expand Down Expand Up @@ -212,11 +212,21 @@ fn main() {
let node_template_path = build_dir.path().join(node_template_folder);

copy_node_template(&options.node_template, build_dir.path());
let cargo_tomls = find_cargo_tomls(build_dir.path().to_owned());
let mut cargo_tomls = find_cargo_tomls(build_dir.path().to_owned());

let commit_id = get_git_commit_id(&options.node_template);
let top_level_cargo_toml_path = node_template_path.join("Cargo.toml");

// Check if top level Cargo.toml exists. If not, create one in the destination
if !cargo_tomls.contains(&top_level_cargo_toml_path) {
// create the top_level_cargo_toml
OpenOptions::new().create(true).write(true).open(top_level_cargo_toml_path.clone())
.expect("Create root level `Cargo.toml` failed.");

// push into our data structure
cargo_tomls.push(PathBuf::from(top_level_cargo_toml_path.clone()));
}

cargo_tomls.iter().for_each(|t| {
let mut cargo_toml = parse_cargo_toml(&t);
replace_path_dependencies_with_git(&t, &commit_id, &mut cargo_toml);
Expand Down
Loading

0 comments on commit ad1dfb1

Please sign in to comment.