Skip to content

Commit

Permalink
still use root directory as start point. (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyWooo authored Sep 29, 2024
1 parent ef0b2df commit 37f110b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions parachain/scripts/generate-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,29 @@ is_bitacross_worker_release() {
[ "${type:3:1}" = "1" ]
}

cd "$ROOTDIR/parachain"
cd "$ROOTDIR"

if is_client_release; then
# base image used to build the node binary
NODE_BUILD_BASE_IMAGE=$(grep FROM docker/Dockerfile | head -n1 | sed 's/^FROM //;s/ as.*//')
NODE_BUILD_BASE_IMAGE=$(grep FROM parachain/docker/Dockerfile | head -n1 | sed 's/^FROM //;s/ as.*//')

# somehow `docker inspect` doesn't pull our litentry-parachain image sometimes
docker pull "$NODE_BUILD_BASE_IMAGE"
docker pull "litentry/litentry-parachain:$PARACHAIN_DOCKER_TAG"

NODE_VERSION=$(grep version node/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//")
NODE_VERSION=$(grep version parachain/node/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//")
NODE_BIN=litentry-collator
# if is_client_release, files are downloaded in the upper layer
NODE_SHA1SUM=$(shasum ../litentry-collator/"$NODE_BIN" | awk '{print $1}')
NODE_SHA1SUM=$(shasum litentry-collator/"$NODE_BIN" | awk '{print $1}')
if [ -f rust-toolchain.toml ]; then
NODE_RUSTC_VERSION=$(rustc --version)
else
NODE_RUSTC_VERSION=$(docker run --rm "$NODE_BUILD_BASE_IMAGE" rustup default nightly 2>&1 | grep " installed" | sed 's/.*installed - //')
fi
fi

SUBSTRATE_DEP=$(grep 'frame-system' ./Cargo.toml | head -n1 | sed 's/.*branch = "//;s/".*//')
FRONTIER_DEP=$(grep 'fc-api' ./Cargo.toml | head -n1 | sed 's/.*branch = "//;s/".*//')
SUBSTRATE_DEP=$(grep 'frame-system' parachain/Cargo.toml | head -n1 | sed 's/.*branch = "//;s/".*//')
FRONTIER_DEP=$(grep 'fc-api' parachain/Cargo.toml | head -n1 | sed 's/.*branch = "//;s/".*//')

echo > "$1"
echo "## This is a release for:" >> "$1"
Expand Down Expand Up @@ -121,7 +121,7 @@ if is_runtime_release; then
echo "## Parachain runtime" >> "$1"
for CHAIN in rococo litentry paseo; do
SRTOOL_DIGEST_FILE=$CHAIN-parachain-runtime/$CHAIN-parachain-srtool-digest.json
RUNTIME_VERSION=$(grep spec_version runtime/$CHAIN/src/lib.rs | sed 's/.*version: //;s/,//')
RUNTIME_VERSION=$(grep spec_version parachain/runtime/$CHAIN/src/lib.rs | sed 's/.*version: //;s/,//')
RUNTIME_COMPRESSED_SIZE=$(cat "$SRTOOL_DIGEST_FILE" | jq .runtimes.compressed.size | sed 's/"//g')
RUNTIME_RUSTC_VERSION=$(cat "$SRTOOL_DIGEST_FILE" | jq .rustc | sed 's/"//g')
RUNTIME_COMPRESSED_SHA256=$(cat "$SRTOOL_DIGEST_FILE" | jq .runtimes.compressed.sha256 | sed 's/"//g')
Expand Down

0 comments on commit 37f110b

Please sign in to comment.