diff --git a/scripts/assets-push.sh b/apps/core/assets-push.sh similarity index 100% rename from scripts/assets-push.sh rename to apps/core/assets-push.sh diff --git a/apps/core/get-latest-admin-version.js b/apps/core/get-latest-admin-version.js index dadbd615..e05eb957 100644 --- a/apps/core/get-latest-admin-version.js +++ b/apps/core/get-latest-admin-version.js @@ -4,7 +4,7 @@ const { fs } = require('zx-cjs') const { dashboard: { repo }, } = require('./package.json') -const Package = require('../../package.json') +const Package = require('./package.json') const endpoint = `https://api.github.com/repos/${repo}/releases/latest` const latestVersion = async () => { diff --git a/apps/core/package.json b/apps/core/package.json index c13bd128..023b4f52 100644 --- a/apps/core/package.json +++ b/apps/core/package.json @@ -33,16 +33,17 @@ "prod:debug": "cross-env NODE_ENV=production nest start --debug --watch", "test": "NODE_ENV=development vitest", "test:watch": "NODE_ENV=development vitest -w", - "docs": "npx @compodoc/compodoc -p tsconfig.json -s -d docs" + "docs": "npx @compodoc/compodoc -p tsconfig.json -s -d docs", + "publish": "bump" }, "bump": { "before": [ "git pull --rebase", "pnpm i", - "node scripts/get-latest-admin-version.js" + "node get-latest-admin-version.js" ], "after": [ - "sh ./scripts/assets-push.sh" + "sh assets-push.sh" ], "changelog": true }, @@ -160,4 +161,4 @@ "mongodb-memory-server": "*", "redis-memory-server": "*" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 9466149c..5648e96a 100644 --- a/package.json +++ b/package.json @@ -25,18 +25,8 @@ "dev": "pnpm -C \"apps/core\" run start", "bundle": "pnpm -C \"apps/core\" run bundle", "test": "pnpm -C \"apps/core\" run test", - "lint": "eslint --cache --ext .ts,.tsx --ignore-path .gitignore . --fix" - }, - "bump": { - "before": [ - "git pull --rebase", - "pnpm i", - "node ./apps/core/scripts/get-latest-admin-version.js" - ], - "after": [ - "sh ./scripts/assets-push.sh" - ], - "changelog": true + "lint": "eslint --cache --ext .ts,.tsx --ignore-path .gitignore . --fix", + "publish:core": "cd apps/core && npm run publish" }, "dependencies": { "zx-cjs": "7.0.7-0"