From c16fbc72f78cab35b1febe52f1a684ab91c7d24f Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 24 Jul 2023 03:55:00 +0000 Subject: [PATCH] chore: update update.sh (&& everithing to be safe) --- update.sh | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/update.sh b/update.sh index ca1498e5..fbe2ef50 100755 --- a/update.sh +++ b/update.sh @@ -1,17 +1,15 @@ #!/usr/bin/env bash function copy_missing_file { - [ -f "packages/backend/native-utils/built/index.js" ] \ - || cp packages/index.js packages/backend/native-utils/built/index.js + [ -f "packages/backend/native-utils/built/index.js" ] || \ + cp packages/index.js packages/backend/native-utils/built/index.js } -git checkout -- package.json packages/backend/assets -git pull --ff - -COMMIT=$(git rev-parse --short HEAD) -sed -i -r "s/\"version\": \"([^+]+).*\",$/\"version\": \"\\1+neko:${COMMIT}\",/" package.json - -corepack prepare pnpm@latest --activate -pnpm i -NODE_ENV=production pnpm run rebuild \ -&& copy_missing_file \ -&& pnpm run migrate +git checkout -- package.json packages/backend/assets && \ +git pull --ff && \ +COMMIT=$(git rev-parse --short HEAD) && \ +sed -i -r "s/\"version\": \"([^+]+).*\",$/\"version\": \"\\1+neko:${COMMIT}\",/" package.json && \ +corepack prepare pnpm@latest --activate && \ +pnpm i && \ +NODE_ENV=production pnpm run rebuild && \ +copy_missing_file && \ +pnpm run migrate