Skip to content
Open
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
3 changes: 3 additions & 0 deletions scripts/srtool/build-srtool-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker build --build-arg RUSTC_VERSION="1.85.0" -t srtool https://github.com/paritytech/srtool.git#refs/tags/v0.17.0
26 changes: 26 additions & 0 deletions scripts/srtool/run-srtool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
if [ -z "$CARGO_HOME" ]; then
echo "CARGO_HOME is not set"
exit 1
fi

cd runtime # check for symlink
if [ ! -L node-subtensor ]; then
ln -s . node-subtensor
fi
cd ..

docker run --rm --user root --platform=linux/amd64 \
-e PACKAGE=node-subtensor-runtime \
-e BUILD_OPTS="--features=metadata-hash" \
-e PROFILE=production \
-v $HOME/.cargo:/cargo-home \
-v $(pwd):/build \
-it srtool bash -c "git config --global --add safe.directory /build && \
/srtool/build --app > /build/runtime/node-subtensor/srtool-output.log; \
BUILD_EXIT_CODE=\$?; \
if [ \"\$BUILD_EXIT_CODE\" -ne 0 ]; then \
cat /build/runtime/node-subtensor/srtool-output.log; \
exit \$BUILD_EXIT_CODE; \
fi && \
tail -n 1 /build/runtime/node-subtensor/srtool-output.log > /build/runtime/node-subtensor/subtensor-digest.json"
Loading