Don't remove build dir
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user