chore: use shorter path
This commit is contained in:
parent
6ca0e63599
commit
59fae1714b
|
@ -78,18 +78,22 @@ if [ "${SKIP_BUILD:-}" != 'yes' ]; then
|
||||||
make "${PROFILE}"
|
make "${PROFILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PREV_DIR_BASE="/tmp/emqx-appup-build"
|
PREV_DIR_BASE="/tmp/_w"
|
||||||
mkdir -p "${PREV_DIR_BASE}"
|
mkdir -p "${PREV_DIR_BASE}"
|
||||||
if [ ! -d "${PREV_DIR_BASE}/${PREV_TAG}" ]; then
|
if [ ! -d "${PREV_DIR_BASE}/${PREV_TAG}" ]; then
|
||||||
cp -R . "${PREV_DIR_BASE}/${PREV_TAG}"
|
cp -R . "${PREV_DIR_BASE}/${PREV_TAG}"
|
||||||
|
# always 'yes' in CI
|
||||||
|
NEW_COPY='yes'
|
||||||
|
else
|
||||||
|
NEW_COPY='no'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "${PREV_DIR_BASE}/${PREV_TAG}"
|
pushd "${PREV_DIR_BASE}/${PREV_TAG}"
|
||||||
REMOTE="$(git remote -v | grep "${GIT_REPO}" | head -1 | awk '{print $1}')"
|
if [ "$NEW_COPY" = 'no' ]; then
|
||||||
git reset --hard
|
REMOTE="$(git remote -v | grep "${GIT_REPO}" | head -1 | awk '{print $1}')"
|
||||||
|
git fetch "$REMOTE"
|
||||||
|
fi
|
||||||
git clean -fdx
|
git clean -fdx
|
||||||
git fetch "$REMOTE"
|
|
||||||
make clean-all
|
|
||||||
git checkout "${PREV_TAG}"
|
git checkout "${PREV_TAG}"
|
||||||
make "$PROFILE"
|
make "$PROFILE"
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Reference in New Issue