Move ci/build to workflow

This commit is contained in:
Gregory Schier
2024-07-19 11:09:07 -07:00
parent fa14b7aaf8
commit fee46de974
2 changed files with 9 additions and 8 deletions

View File

@@ -67,7 +67,16 @@ jobs:
- name: Install Node dependencies
run: npm ci
- name: Install plugins deps
run: npm --prefix $YAAK_PLUGINS_DIR ci
- name: Build plugins
working-directory: $YAAK_PLUGINS
run: |
npm ci
npm run build
- name: Copy plugins to Tauri app
run: node scripts/copy-plugins.cjs
- name: Run lint

View File

@@ -1,5 +1,4 @@
const {readdirSync, cpSync} = require("node:fs");
const {execSync} = require("node:child_process");
const path = require("node:path");
console.log('-----> Starting copy plugins script');
const PLUGINS_DIR = process.env.YAAK_PLUGINS_DIR;
@@ -8,13 +7,6 @@ if (!PLUGINS_DIR) {
process.exit(1);
}
console.log('Installing dependencies', PLUGINS_DIR);
const out = execSync('which npm', {cwd: PLUGINS_DIR, env: process.env}).toString('utf-8');
console.log("WHICH NPM?", out);
execSync('npm ci', {cwd: PLUGINS_DIR, env: process.env});
console.log('Building plugins', PLUGINS_DIR);
execSync('npm run build', {cwd: PLUGINS_DIR, env: process.env});
const pluginsRoot = path.join(PLUGINS_DIR, 'plugins');
for (const name of readdirSync(pluginsRoot)) {
const dir = path.join(pluginsRoot, name);