mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 21:30:53 +08:00
fix(monorepo/server): building the server
This commit is contained in:
parent
37bf7c2bfb
commit
402da5df87
3 changed files with 23 additions and 30 deletions
2
.github/actions/build-server/action.yml
vendored
2
.github/actions/build-server/action.yml
vendored
|
|
@ -22,7 +22,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
npm run chore:update-build-info
|
npm run chore:update-build-info
|
||||||
./bin/build-server.sh
|
npm run package
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ NODE_VERSION=22.14.0
|
||||||
|
|
||||||
BUILD_DIR="./build"
|
BUILD_DIR="./build"
|
||||||
DIST_DIR="./dist"
|
DIST_DIR="./dist"
|
||||||
CLEANUP_SCRIPT="./bin/cleanupNodeModules.ts"
|
CLEANUP_SCRIPT="./scripts/cleanupNodeModules.ts"
|
||||||
|
|
||||||
|
|
||||||
# Trigger the build
|
# Trigger the build
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,6 @@ function main() {
|
||||||
|
|
||||||
function cleanupNodeModules(basePath: string, pruneDevDeps: boolean = true) {
|
function cleanupNodeModules(basePath: string, pruneDevDeps: boolean = true) {
|
||||||
|
|
||||||
// This needs to run for the server and Docker build,
|
|
||||||
// but needs to be skipped for electron-forge: its
|
|
||||||
// built-in pruning takes care of it already
|
|
||||||
if (pruneDevDeps) {
|
|
||||||
execSync(`npm ci --omit=dev --prefix ${basePath}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const nodeModulesDirPath = path.join(basePath, "node_modules");
|
const nodeModulesDirPath = path.join(basePath, "node_modules");
|
||||||
const nodeModulesContent = fs.readdirSync(nodeModulesDirPath, { recursive: true, withFileTypes: true });
|
const nodeModulesContent = fs.readdirSync(nodeModulesDirPath, { recursive: true, withFileTypes: true });
|
||||||
//const libDir = fs.readdirSync(path.join(basePath, "./libraries"), { recursive: true, withFileTypes: true });
|
//const libDir = fs.readdirSync(path.join(basePath, "./libraries"), { recursive: true, withFileTypes: true });
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue