forked from ghostchain/ghost-node
pin compiler version to fixed 1.93.1
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
6e1fd726f3
commit
cc45fb5f9c
@ -346,7 +346,7 @@ sha256sum /etc/ghost/casper.json
|
|||||||
|
|
||||||
You should see:
|
You should see:
|
||||||
```
|
```
|
||||||
9da6045ed6d4fd844e3939573b31c013d0e564e542029330faa6d978cb4a915a
|
4645c7d39a64424d823f659d408070f8c90426117e7af147b0360697b2db7f4f /etc/ghost/casper.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Create running `ghost-node` service that starts on system boot using `--unit-file` flag.
|
Create running `ghost-node` service that starts on system boot using `--unit-file` flag.
|
||||||
|
|||||||
4
rust-toolchain.toml
Normal file
4
rust-toolchain.toml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[toolchain]
|
||||||
|
channel = "1.93.1"
|
||||||
|
components = ["rustfmt", "clippy", "rust-src"]
|
||||||
|
targets = ["wasm32-unknown-unknown"]
|
||||||
@ -85,30 +85,16 @@ extract_seed() {
|
|||||||
echo $seed
|
echo $seed
|
||||||
}
|
}
|
||||||
|
|
||||||
upgrade_compiler_if_needed() {
|
apply_patches_if_needed() {
|
||||||
UPDATE_STATUS=$(rustup check 2>&1)
|
local PATCH_STATUS=0
|
||||||
"$SCRIPT_FOLDER"/patch.sh || PATCH_STATUS=$?
|
"$SCRIPT_FOLDER"/patch.sh || PATCH_STATUS=$?
|
||||||
|
|
||||||
if echo "$UPDATE_STATUS" | grep -q "Update available" || [ $PATCH_STATUS -eq 2 ]; then
|
if [ "$PATCH_STATUS" -eq 2 ]; then
|
||||||
echo "[+] clean all cache on the current system"
|
echo "[+] clean all cache on the current system"
|
||||||
cargo install cargo-cache
|
|
||||||
cargo clean
|
cargo clean
|
||||||
|
cargo install cargo-cache
|
||||||
cargo cache --remove-dir all
|
cargo cache --remove-dir all
|
||||||
|
|
||||||
echo "[+] upgrading rustc compiler version to latest"
|
|
||||||
rustup update
|
|
||||||
toolchain_name=$(rustup show | grep default | head -n 1 | cut -d' ' -f1)
|
|
||||||
|
|
||||||
if ! rustup target list --installed | grep -q "wasm32-unknown-unknown"; then
|
|
||||||
echo "[+] installing wasm32-unknown-unknown target"
|
|
||||||
rustup target add wasm32-unknown-unknown
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! rustup component list --installed | grep -q "rust-src"; then
|
|
||||||
echo "[+] installing rust-src component"
|
|
||||||
rustup component add rust-src
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[+] fetching all dependencies"
|
echo "[+] fetching all dependencies"
|
||||||
cargo fetch
|
cargo fetch
|
||||||
|
|
||||||
@ -240,7 +226,7 @@ if [[ $HARD_RESET = true ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
upgrade_compiler_if_needed
|
apply_patches_if_needed
|
||||||
|
|
||||||
echo "[+] trying to stop current ghost-node"
|
echo "[+] trying to stop current ghost-node"
|
||||||
sudo systemctl stop ghost-node
|
sudo systemctl stop ghost-node
|
||||||
@ -349,12 +335,12 @@ if [[ $SET_ENVIRONMENT = true ]]; then
|
|||||||
|
|
||||||
if prompt "[?] setup the rust environment (e.g. WASM support)?"; then
|
if prompt "[?] setup the rust environment (e.g. WASM support)?"; then
|
||||||
rustup default stable
|
rustup default stable
|
||||||
upgrade_compiler_if_needed
|
apply_patches_if_needed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z $RELEASE ]]; then
|
if [[ ! -z $RELEASE ]]; then
|
||||||
upgrade_compiler_if_needed
|
apply_patches_if_needed
|
||||||
if prompt "[?] 'cargo build $RELEASE $FEATURES' is what you want?"; then
|
if prompt "[?] 'cargo build $RELEASE $FEATURES' is what you want?"; then
|
||||||
cd $PROJECT_FOLDER
|
cd $PROJECT_FOLDER
|
||||||
echo "[+] starting build in 3 seconds..."
|
echo "[+] starting build in 3 seconds..."
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user