chore: update update.sh (&& everithing to be safe)
This commit is contained in:
parent
9026c0f5d4
commit
c16fbc72f7
1 changed files with 11 additions and 13 deletions
24
update.sh
24
update.sh
|
@ -1,17 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
function copy_missing_file {
|
function copy_missing_file {
|
||||||
[ -f "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
|
cp packages/index.js packages/backend/native-utils/built/index.js
|
||||||
}
|
}
|
||||||
|
|
||||||
git checkout -- package.json packages/backend/assets
|
git checkout -- package.json packages/backend/assets && \
|
||||||
git pull --ff
|
git pull --ff && \
|
||||||
|
COMMIT=$(git rev-parse --short HEAD) && \
|
||||||
COMMIT=$(git rev-parse --short HEAD)
|
sed -i -r "s/\"version\": \"([^+]+).*\",$/\"version\": \"\\1+neko:${COMMIT}\",/" package.json && \
|
||||||
sed -i -r "s/\"version\": \"([^+]+).*\",$/\"version\": \"\\1+neko:${COMMIT}\",/" package.json
|
corepack prepare pnpm@latest --activate && \
|
||||||
|
pnpm i && \
|
||||||
corepack prepare pnpm@latest --activate
|
NODE_ENV=production pnpm run rebuild && \
|
||||||
pnpm i
|
copy_missing_file && \
|
||||||
NODE_ENV=production pnpm run rebuild \
|
pnpm run migrate
|
||||||
&& copy_missing_file \
|
|
||||||
&& pnpm run migrate
|
|
||||||
|
|
Loading…
Reference in a new issue