Skip to content

Commit

Permalink
release build script: remove the build worktree if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
agalasso committed Jan 11, 2025
1 parent ad1797b commit fd5defa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/make-release
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ setup_worktree () {

umask 022
load_config
# remove the existing worktree
while IFS= read -r line; do
if [[ $line == "worktree $worktree" ]]; then
git worktree remove --force "$worktree"
fi
done < <(git worktree list --porcelain)
git worktree add --force "$worktree" "$branch"
trap cleanup_worktree EXIT

Expand Down

0 comments on commit fd5defa

Please sign in to comment.