Don't remove build dir

This commit is contained in:
2024-11-19 20:01:52 -05:00
parent a75505f467
commit 98c17f4ad7

View File

@@ -473,9 +473,7 @@ from_source() {
# Generate commitish for git worktree # Generate commitish for git worktree
case "$RELEASE" in case "$RELEASE" in
snapshot) snapshot) wt_commit="origin/main" ;;
wt_commit="origin/main"
;;
[0-9][0-9].[0-9][0-9].*) [0-9][0-9].[0-9][0-9].*)
local branch="openwrt-${RELEASE%.*}" local branch="openwrt-${RELEASE%.*}"
local tag="v$RELEASE" local tag="v$RELEASE"
@@ -492,16 +490,16 @@ from_source() {
esac esac
# TODO There's a bug in the make clean functions that seem to invoke a full make # TODO There's a bug in the make clean functions that seem to invoke a full make
# if [[ -d "$GITWORKTREEDIR" ]]; then if [[ -d "$GITWORKTREEDIR" ]]; then
# execute git -C "$GITWORKTREEDIR" checkout "$wt_commit" execute git -C "$GITWORKTREEDIR" checkout "$wt_commit"
# execute git -C "$GITWORKTREEDIR" pull execute git -C "$GITWORKTREEDIR" pull
# else else
# execute git -C "$GITSRCDIR" worktree add --force --detach "$GITWORKTREEDIR" "$wt_commit" execute git -C "$GITSRCDIR" worktree add --force --detach "$GITWORKTREEDIR" "$wt_commit"
# fi fi
# To workaround bug, don't use make *clean, blow it away and start fresh # To workaround bug, don't use make *clean, blow it away and start fresh
[[ -d "$GITWORKTREEDIR" ]] && execute rm -rf "$GITWORKTREEDIR" # [[ -d "$GITWORKTREEDIR" ]] && execute rm -rf "$GITWORKTREEDIR"
execute git -C "$GITSRCDIR" worktree add --force --detach "$GITWORKTREEDIR" "$wt_commit" # execute git -C "$GITSRCDIR" worktree add --force --detach "$GITWORKTREEDIR" "$wt_commit"
# Print commit information # Print commit information
commit=$(git -C "$GITWORKTREEDIR" rev-parse HEAD) commit=$(git -C "$GITWORKTREEDIR" rev-parse HEAD)