Fix: Database migration and mail template files were not included in dist.

* Moved copying server-build/ from grunt to package.json
  using rsync to make sure to copy exactly what is needed
  and resolve symlinks correctly.
This commit is contained in:
baldo 2021-02-22 21:36:40 +01:00
parent bde2a8710a
commit 8c93a47682
3 changed files with 3 additions and 14 deletions

View file

@ -354,18 +354,6 @@ module.exports = function (grunt) {
dest: '<%= yeoman.dist %>/client/images',
src: ['generated/*']
},
{
expand: true,
cwd: 'server-build',
dest: '<%= yeoman.dist %>/server',
src: [
'{,**/}*.html',
'{,**/}*.template',
'{,**/}*.js',
'{,**/}*.sql',
'{,**/}*.txt'
]
},
{
expand: true,
cwd: 'shared',

View file

@ -20,12 +20,12 @@
},
"scripts": {
"test": "npm run server:test",
"build": "npm run server:build && grunt build",
"build": "npm run server:build && grunt build && rsync -avzL --exclude='*/__mocks__/' --exclude='*.test.*' server-build/ dist/server/",
"clean": "rm -rf server-build/ && grunt clean",
"dist": "npm run clean && npm run build && npm run test",
"client:serve": "grunt serve",
"server:test": "jest --config=jest.server.config.js",
"server:build": "tsc -b server && ln -sfv ../server/db/patches ./server-build/db/ && ln -sfv ../server/templates ./server-build/ && ln -sfv ../server/mailTemplates ./server-build/",
"server:build": "tsc -b server && ln -sfv ../../server/db/patches ./server-build/db/ && ln -sfv ../server/templates ./server-build/ && ln -sfv ../server/mailTemplates ./server-build/",
"server:run": "npm run server:build && node server-build/main.js"
},
"dependencies": {

View file

@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
git
nasm
nodejs-10_x
rsync
sqlite
zlib
];