File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ require ( 'dotenv' ) . config ( ) ;
2
+
3
+ import Bluebird from 'bluebird' ;
4
+ import logger from 'src/utils/logger' ;
5
+
6
+ import drivers from 'src/drivers' ;
7
+ import { readTmpFileAsyncFactory , readTmpFileFactory } from 'src/utils/fs' ;
8
+
9
+ // Get 'readTmpFile' and 'readTmpFileAsync' bound by 'api'
10
+ const PROJECT_TYPE = 'guides' ;
11
+ const readTmpFile = readTmpFileFactory ( PROJECT_TYPE ) ;
12
+ const readTmpFileAsync = readTmpFileAsyncFactory ( PROJECT_TYPE ) ;
13
+
14
+ const { DRIVER } = process . env ;
15
+
16
+ const SelectedDriver = drivers [ DRIVER ] ;
17
+
18
+ export function run ( ) {
19
+ // Initialise the driver
20
+ SelectedDriver . init ( 'guides' ) ;
21
+
22
+ return readTmpFileAsync ( 'versions.json' )
23
+ . then ( emberJson => emberJson . data . attributes [ 'all-versions' ] )
24
+ . map ( )
25
+ . tap ( console . log ) ;
26
+ }
You can’t perform that action at this time.
0 commit comments