chore: use env variables in esbuilds

This commit is contained in:
David Arnold 2024-01-14 12:26:25 +01:00
parent 32e44f77a9
commit 93bbe615ba
No known key found for this signature in database
GPG key ID: AB15A6AF1101390D
2 changed files with 14 additions and 4 deletions

View file

@ -1,11 +1,16 @@
const path = require("path");
const fs = require("fs");
const chalk = require("chalk");
let bench_path;
if (process.env.FRAPPE_BENCH_ROOT) {
bench_path = process.env.FRAPPE_BENCH_ROOT;
} else {
const frappe_path = path.resolve(__dirname, "..");
const bench_path = path.resolve(frappe_path, "..", "..");
const sites_path = path.resolve(bench_path, "sites");
bench_path = path.resolve(frappe_path, "..", "..");
}
const apps_path = path.resolve(bench_path, "apps");
const sites_path = path.resolve(bench_path, "sites");
const assets_path = path.resolve(sites_path, "assets");
const app_list = get_apps_list();

View file

@ -1,7 +1,12 @@
const fs = require("fs");
const path = require("path");
const redis = require("@redis/client");
const bench_path = path.resolve(__dirname, "..", "..");
let bench_path;
if (process.env.FRAPPE_BENCH_ROOT) {
bench_path = process.env.FRAPPE_BENCH_ROOT;
} else {
bench_path = path.resolve(__dirname, "..", "..");
}
const dns = require("dns");