File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
buildkite/scripts/archive Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 2828set -euo pipefail
2929
3030MODE=" default"
31- BRANCH =" develop"
31+ COMPARISION_BRANCH =" develop"
3232REPO_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 }
You can’t perform that action at this time.
0 commit comments