From 14048bfdae8157d5959bba5df476c92e267b1fb9 Mon Sep 17 00:00:00 2001 From: Rocka Date: Fri, 7 Jul 2023 19:42:48 +0800 Subject: [PATCH] fix --- script/ci-build.sh | 8 +++++--- script/webpack.js | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/script/ci-build.sh b/script/ci-build.sh index d3a07eff..7b675364 100755 --- a/script/ci-build.sh +++ b/script/ci-build.sh @@ -16,8 +16,8 @@ PLATFORMS=(linux darwin) VERSION_HASH=$(git rev-parse --short HEAD) PKG_VER="$VERSION_HASH" QSHELL_VER="v2.12.0" -QSHELL_DIR="node_modules/.cache/qshell/$QSHELL_VER" -QSHELL_BIN="$QSHELL_DIR/bin/qshell-linux-x64-$QSHELL_VER" +QSHELL_DIR="node_modules/.cache/qshell" +QSHELL_BIN="$QSHELL_DIR/qshell" # functions build_dist() { @@ -49,7 +49,7 @@ build_tar() { qshell_init() { if [ ! -x "$QSHELL_BIN" ] ; then curl -Lo "$QSHELL_DIR/qshell.tar.gz" --create-dirs "https://kodo-toolbox-new.qiniu.com/qshell-${QSHELL_VER}-linux-amd64.tar.gz" - tar xf "$QSHELL_DIR/qshell.zip" --directory="$QSHELL_DIR/bin" + tar xf "$QSHELL_DIR/qshell.tar.gz" --directory="$QSHELL_DIR" chmod +x "$QSHELL_BIN" fi # Usage: qshell account [--overwrite | -w] @@ -63,6 +63,8 @@ qshell_upload() { "$QSHELL_BIN" rput "$BUCKET_NAME" "$1" "build/$1" } +echo "BUILD_MODE=$BUILD_MODE" + case "$BUILD_MODE" in pull_request) build_dist diff --git a/script/webpack.js b/script/webpack.js index a942cda7..38ea6194 100644 --- a/script/webpack.js +++ b/script/webpack.js @@ -12,8 +12,8 @@ if (argv.length === 0) { process.argv = process.argv.slice(0, 2); } -// yeah! patch packages! -cp.execSync('patch-packages'); +// yeah! patch package! +cp.execSync('patch-package'); process.env.NODE_ENV = 'production';