Browse Source

scripts: cleanup

Mokhtar Naamani 4 năm trước cách đây
mục cha
commit
bce4b6c0bf
2 tập tin đã thay đổi với 6 bổ sung10 xóa
  1. 0 4
      scripts/alter-block-creation-time.sh
  2. 6 6
      scripts/raspberry-cross-build.sh

+ 0 - 4
scripts/alter-block-creation-time.sh

@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-perl -i -pe's/pub const MILLISECS_PER_BLOCK: Moment = 6000;/pub const MILLISECS_PER_BLOCK: Moment = 2000;/' runtime/src/constants.rs
-perl -i -pe's/pub const SLOT_DURATION: Moment = 6000;/pub const SLOT_DURATION: Moment = 2000;/' runtime/src/constants.rs

+ 6 - 6
scripts/raspberry-cross-build.sh

@@ -1,18 +1,18 @@
 #!/usr/bin/env bash
 
-# Run this script from the crago workspace root
-
 # Cross compiles release build of joystream-node
 # for Raspberry Pi - using docker
 
 # joystream/rust-raspberry image was built from:
-# https://github.com/mnaamani/rust-on-raspberry-docker/commit/8536508b743d55c8573043c4082c62da3b4fd3e2
+# https://github.com/mnaamani/rust-on-raspberry-docker/tree/add-wasm-toolchain-and-clang
+
+export WORKSPACE_ROOT=`cargo metadata --offline --no-deps --format-version 1 | jq .workspace_root -r`
 
 docker run \
-    --volume ${PWD}/:/home/cross/project \
+    -e WASM_BUILD_TOOLCHAIN=nightly-2020-05-23 \
+    --volume ${WORKSPACE_ROOT}/:/home/cross/project \
     --volume ${HOME}/.cargo/registry:/home/cross/.cargo/registry \
     joystream/rust-raspberry \
     build --release -p joystream-node
 
-# artifacts will be relative to the working directory:
-# target/arm-unknown-linux-gnueabihf/joystream-node
+ls -l target/arm-unknown-linux-gnueabihf/joystream-node