|
1 | | -import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'; |
| 1 | +import { existsSync, readFileSync, writeFileSync } from 'fs'; |
2 | 2 | import { dirname, join } from 'path'; |
3 | 3 | import { fileURLToPath } from 'url'; |
4 | 4 |
|
@@ -40,26 +40,18 @@ async function getCurrentBlockNumber() { |
40 | 40 | * @param {number} forkBlockNumber - The block number to fork from |
41 | 41 | */ |
42 | 42 | async function createEnvFiles(forkBlockNumber) { |
43 | | - if (process.env.DRONE) { |
44 | | - const LOCAL_STACK_ENV_DIR = 'local-stack-env'; |
45 | | - console.log(`Creating ${LOCAL_STACK_ENV_DIR} directory for drone test-stack`); |
46 | | - mkdirSync(LOCAL_STACK_ENV_DIR, { recursive: true }); |
47 | | - writeFileSync(join(LOCAL_STACK_ENV_DIR, 'FORK_URL'), forkUrl); |
48 | | - writeFileSync(join(LOCAL_STACK_ENV_DIR, 'FORK_BLOCK'), `${forkBlockNumber}`); |
49 | | - } else { |
50 | | - console.log('Creating .env file for docker-compose test-stack'); |
51 | | - writeFileSync( |
52 | | - '.env', |
53 | | - `############ THIS FILE IS GENERATED ############ |
| 43 | + console.log('Creating .env file for docker-compose test-stack'); |
| 44 | + writeFileSync( |
| 45 | + '.env', |
| 46 | + `############ THIS FILE IS GENERATED ############ |
54 | 47 | # run "node prepare-test-env.js" to regenerate # |
55 | 48 | ################################################ |
56 | 49 |
|
57 | 50 | # blockchain node to use as the reference for the local fork |
58 | 51 | FORK_URL=${forkUrl} |
59 | 52 | # block number to fork from |
60 | 53 | FORK_BLOCK=${forkBlockNumber}`, |
61 | | - ); |
62 | | - } |
| 54 | + ); |
63 | 55 | } |
64 | 56 |
|
65 | 57 | /** |
|
0 commit comments