From ca17417f7c5651a61be1a44966d344f5d5519a28 Mon Sep 17 00:00:00 2001 From: DL Date: Mon, 23 Dec 2024 14:46:19 +0800 Subject: [PATCH] fix semver-diff-check-no-build (#139) --- .../contracts-bedrock/scripts/checks/check-semver-diff.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/contracts-bedrock/scripts/checks/check-semver-diff.sh b/packages/contracts-bedrock/scripts/checks/check-semver-diff.sh index 08540879a96d..05aad2a27d68 100755 --- a/packages/contracts-bedrock/scripts/checks/check-semver-diff.sh +++ b/packages/contracts-bedrock/scripts/checks/check-semver-diff.sh @@ -32,14 +32,14 @@ temp_dir=$(mktemp -d) trap 'rm -rf "$temp_dir"' EXIT # Exit early if semver-lock.json has not changed. -if ! { git diff origin/develop...HEAD --name-only; git diff --name-only; git diff --cached --name-only; } | grep -q "$SEMVER_LOCK"; then +if ! { git diff origin/op-es...HEAD --name-only; git diff --name-only; git diff --cached --name-only; } | grep -q "$SEMVER_LOCK"; then echo "No changes detected in semver-lock.json" exit 0 fi # Get the upstream semver-lock.json. -if ! git show origin/develop:packages/contracts-bedrock/snapshots/semver-lock.json > "$temp_dir/upstream_semver_lock.json" 2>/dev/null; then - echo "❌ Error: Could not find semver-lock.json in the snapshots/ directory of develop branch" +if ! git show origin/op-es:packages/contracts-bedrock/snapshots/semver-lock.json > "$temp_dir/upstream_semver_lock.json" 2>/dev/null; then + echo "❌ Error: Could not find semver-lock.json in the snapshots/ directory of op-es branch" exit 1 fi @@ -80,7 +80,7 @@ for contract in $changed_contracts; do # Extract the old and new source files. old_source_file="$temp_dir/old_${contract##*/}" new_source_file="$temp_dir/new_${contract##*/}" - git show origin/develop:packages/contracts-bedrock/"$contract" > "$old_source_file" 2>/dev/null || true + git show origin/op-es:packages/contracts-bedrock/"$contract" > "$old_source_file" 2>/dev/null || true cp "$contract" "$new_source_file" # Extract the old and new versions.