@@ -3,6 +3,7 @@ import * as fs from "fs-extra";
3
3
import * as yamlParser from "js-yaml" ;
4
4
import { getArg } from "./utils/args" ;
5
5
import gitP , { SimpleGit } from "simple-git/promise" ;
6
+ import { gitPCherryPick } from "./utils/cherryPick" ;
6
7
import { getCommits , CommitLogObject } from "./utils/commits" ;
7
8
8
9
async function validate ( args : string [ ] ) {
@@ -46,10 +47,18 @@ async function validate(args: string[]) {
46
47
await fs . emptyDir ( tmpDir ) ;
47
48
}
48
49
const tempGit : SimpleGit = gitP ( tmpDir ) ;
50
+
51
+ console . log ( Object . keys ( gitP ) ) ;
52
+
49
53
await tempGit . init ( ) ;
54
+ await tempGit . addRemote ( "origin" , skeleton . config . repo . uri ) ;
55
+ await tempGit . fetch ( "origin" , skeleton . config . repo . branch ) ;
56
+ // no js cherry pick implementation
57
+ const cherryPick = gitPCherryPick ( tmpDir ) ;
50
58
51
59
// VALIDATE TUTORIAL TESTS
52
60
if ( commits . INIT ) {
61
+ cherryPick ( commits . INIT ) ;
53
62
}
54
63
55
64
// run test runner setup command(s)
@@ -71,7 +80,7 @@ async function validate(args: string[]) {
71
80
console . error ( e . message ) ;
72
81
} finally {
73
82
// cleanup
74
- await fs . emptyDir ( tmpDir ) ;
83
+ // await fs.emptyDir(tmpDir);
75
84
}
76
85
}
77
86
0 commit comments