Skip to content

Commit 9eda7f4

Browse files
committed
BRANCH -> COMPARISION_BRANCH
1 parent 26405d6 commit 9eda7f4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

buildkite/scripts/archive/upgrade-script-check.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
set -euo pipefail
2929

3030
MODE="default"
31-
BRANCH="develop"
31+
COMPARISION_BRANCH="develop"
3232
REPO_ROOT="$(git rev-parse --show-toplevel)"
3333

3434
# Parse command line arguments
@@ -44,7 +44,7 @@ parse_args() {
4444
shift 2
4545
;;
4646
-b|--comparison-branch)
47-
BRANCH="$2"
47+
COMPARISION_BRANCH="$2"
4848
shift 2
4949
;;
5050
-h|--help)
@@ -80,13 +80,13 @@ has_changes() {
8080
fi
8181

8282
# Fetch latest branch to ensure accurate comparison
83-
git fetch origin "$BRANCH" >/dev/null 2>&1 || {
84-
echo "Error: Failed to fetch origin/$BRANCH" >&2
83+
git fetch origin "$COMPARISION_BRANCH" >/dev/null 2>&1 || {
84+
echo "Error: Failed to fetch origin/$COMPARISION_BRANCH" >&2
8585
exit 1
8686
}
8787

8888
# Check if file has differences
89-
if ! git diff --quiet "origin/$BRANCH" -- "$REPO_ROOT/$file" 2>/dev/null; then
89+
if ! git diff --quiet "origin/$COMPARISION_BRANCH" -- "$REPO_ROOT/$file" 2>/dev/null; then
9090
return 0
9191
else
9292
return 1
@@ -100,9 +100,9 @@ has_changes_in_git() {
100100
fi
101101

102102
# Fetch latest branch to ensure accurate comparison
103-
git fetch origin "$BRANCH" >/dev/null 2>&1 || {
103+
git fetch origin "$COMPARISION_BRANCH" >/dev/null 2>&1 || {
104104
if [[ "$MODE" == "verbose" ]]; then
105-
echo "Error: Failed to fetch origin/$BRANCH" >&2
105+
echo "Error: Failed to fetch origin/$COMPARISION_BRANCH" >&2
106106
fi
107107
return 1
108108
}

0 commit comments

Comments
 (0)