Skip to content

Commit 70c09bb

Browse files
committed
tmp fix with fallback
1 parent 54a69de commit 70c09bb

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

examples/justfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,22 @@ setup-westend-prerequisites:
4343

4444
cd $POLKADOT_SDK_DIR
4545

46-
# Check out the required branch
47-
echo " Checking out branch bko-bulletin-para-support..."
46+
# Check out the required branch or commit
47+
echo " Fetching latest changes from polkadot-sdk..."
4848
git fetch origin
49-
# TODO: later, before merging, switch to the `bko-bulletin-support` https://github.com/paritytech/polkadot-sdk/pull/10662 (not now)
50-
git reset --hard origin/bko-bulletin-para-support
49+
50+
# Try to check out the branch, fall back to commit hash if branch doesn't exist
51+
BRANCH_NAME="bko-bulletin-para-support"
52+
FALLBACK_COMMIT="b2bcb74b13f1a1e082f701e3e05ce1be44d16790" # From Cargo.toml
53+
54+
if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
55+
echo " Checking out branch $BRANCH_NAME..."
56+
git reset --hard origin/$BRANCH_NAME
57+
else
58+
echo " ⚠ Branch $BRANCH_NAME not found, using commit $FALLBACK_COMMIT instead..."
59+
echo " TODO: later, before merging, switch to the \`bko-bulletin-support\` https://github.com/paritytech/polkadot-sdk/pull/10662 (not now)"
60+
git reset --hard $FALLBACK_COMMIT
61+
fi
5162

5263
# Build polkadot binary
5364
echo " Building polkadot binary (this may take a while)..."

0 commit comments

Comments
 (0)