mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
maint(linux): address code review comments
This commit is contained in:
parent
525d54ab65
commit
6cf43ddace
1 changed files with 7 additions and 6 deletions
|
|
@ -119,16 +119,16 @@ function push_to_github_and_create_pr() {
|
|||
}
|
||||
|
||||
function cleanup_worktree() {
|
||||
if [[ -d "linux/debianpackage" ]]; then
|
||||
cp -r linux/debianpackage "${KEYMAN_ROOT}/linux"
|
||||
if [[ -d "${WORKTREE_DIR:-}/linux/debianpackage" ]]; then
|
||||
cp -r "${WORKTREE_DIR}/linux/debianpackage" "${KEYMAN_ROOT}/linux"
|
||||
fi
|
||||
|
||||
cd "${PREV_DIR:-}" || true
|
||||
cd "${PREV_DIR:-}"
|
||||
|
||||
if [[ -n "${WORKTREE_DIR:-}" ]] && [[ -d "${WORKTREE_DIR}" ]]; then
|
||||
builder_echo "Removing temporary worktree"
|
||||
git worktree remove -f "${WORKTREE_DIR}" || true
|
||||
git branch -f -D "${WORKTREE_BRANCH}" || true
|
||||
git worktree remove -f "${WORKTREE_DIR}"
|
||||
git branch -f -D "${WORKTREE_BRANCH}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ fi
|
|||
|
||||
# Create a temporary worktree so that we start with a clean copy of the
|
||||
# target branch (stable/beta). Checkout stable/beta branch so that
|
||||
# `scripts/debian.sh` picks up correct version
|
||||
# scripts/debian.sh picks up correct version
|
||||
|
||||
WORKTREE_BRANCH="maint/linux/tmp-packaging-${DEPLOY_BRANCH#origin/}"
|
||||
PREV_DIR="$PWD"
|
||||
|
|
@ -152,6 +152,7 @@ PREV_DIR="$PWD"
|
|||
WORKTREE_DIR="$(git worktree list | grep "${WORKTREE_BRANCH}" | cut -d' ' -f1)"
|
||||
if [[ -n "${WORKTREE_DIR}" ]] && [[ -d "${WORKTREE_DIR}" ]]; then
|
||||
builder_heading "Reusing existing worktree at ${WORKTREE_DIR}"
|
||||
git checkout -B "${WORKTREE_BRANCH}" "${DEPLOY_BRANCH#origin/}"
|
||||
else
|
||||
WORKTREE_DIR="$(mktemp -d)"
|
||||
builder_heading "Creating temporary worktree at ${WORKTREE_DIR}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue