Skip to content

Commit

Permalink
Merge pull request #18266 from owen-mc/misc/prepare-db-upgrade-improv…
Browse files Browse the repository at this point in the history
…ement

Misc: Look up remote name instead of using `origin` in `misc/prepare-db-upgrade.sh`
  • Loading branch information
owen-mc authored Dec 13, 2024
2 parents 9948f6e + 8d5759d commit 906c517
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion misc/scripts/prepare-db-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ EOF
exit "${exit_code}"
}

prev_hash="origin/main"
# default for prev_hash: the main branch of the remote for 'github/codeql'.
# This works out as a dynamic lookup of the hash of the file in the main branch
# of the repo.
prev_hash=$(git remote -v | grep 'github/codeql\.git (fetch)$' | cut -f1)/main

while [ $# -gt 0 ]; do
case "$1" in
Expand Down

0 comments on commit 906c517

Please sign in to comment.