* Add a start:cloud command to the webapp * Update airbyte-webapp/scripts/environment.js Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com> Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com>
26 lines
669 B
JavaScript
26 lines
669 B
JavaScript
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const dotenv = require("dotenv");
|
|
|
|
if (!process.env.AB_ENV) {
|
|
return;
|
|
}
|
|
|
|
const envFile = path.resolve(
|
|
__dirname,
|
|
"../../../airbyte-cloud/cloud-webapp/development",
|
|
`.env.${process.env.AB_ENV}`
|
|
);
|
|
|
|
if (!fs.existsSync(envFile)) {
|
|
console.error(
|
|
`~~~ This mode is for Airbyte employees only. ~~~\n` +
|
|
`Could not find .env file for environment ${process.env.AB_ENV} (looking at ${envFile}).\n` +
|
|
`Make sure you have the latest airbyte-cloud repository checked out in a directory directly next to the airbyte OSS repository.\n`
|
|
);
|
|
process.exit(42);
|
|
}
|
|
|
|
dotenv.config({ path: envFile });
|