Change name of env variable used in script
This commit is contained in:
@@ -20,10 +20,7 @@ const path = require('path');
|
||||
// Figure out whether we're running inside the backstage repo or as an installed dependency
|
||||
const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src'));
|
||||
|
||||
// This is used for e2e-tests where we create a new app in a tmp folder
|
||||
const isTemp = path.resolve(__dirname).includes(require('os').tmpdir());
|
||||
|
||||
if (!isLocal || isTemp || process.env.E2E) {
|
||||
if (!isLocal || process.env.BACKSTAGE_E2E_CLI_TEST) {
|
||||
// src-relative imports are a pain to get to work with plain tsc compilation, as the
|
||||
// transpiled code will maintain the imports as they are in the source. Which means an
|
||||
// import for `helpers/paths` will start like that in the output, which won't work in NodeJS.
|
||||
|
||||
@@ -30,7 +30,7 @@ export async function withCache(
|
||||
buildFunc: () => Promise<void>,
|
||||
): Promise<void> {
|
||||
const key = await Cache.readInputKey(options.inputs);
|
||||
if (!key || process.env.E2E) {
|
||||
if (!key || process.env.BACKSTAGE_E2E_CLI_TEST) {
|
||||
print('input directory is dirty, skipping cache');
|
||||
await fs.remove(options.output);
|
||||
await buildFunc();
|
||||
|
||||
@@ -155,7 +155,7 @@ export default async () => {
|
||||
await moveApp(tempDir, appDir, answers.name);
|
||||
|
||||
// e2e testing needs special treatment
|
||||
if (process.env.E2E) {
|
||||
if (process.env.BACKSTAGE_E2E_CLI_TEST) {
|
||||
Task.section('Linking packages locally for e2e tests');
|
||||
const rootDir = process.env.CI
|
||||
? resolvePath(process.env.GITHUB_WORKSPACE!)
|
||||
|
||||
@@ -32,7 +32,7 @@ const generateTempDir = require('./generateTempDir.js');
|
||||
Browser.localhost('localhost', 3000);
|
||||
|
||||
async function main() {
|
||||
process.env.E2E = 'true';
|
||||
process.env.BACKSTAGE_E2E_CLI_TEST = 'true';
|
||||
|
||||
const rootDir = process.env.CI
|
||||
? resolvePath(process.env.GITHUB_WORKSPACE)
|
||||
|
||||
Reference in New Issue
Block a user