@@ -3,6 +3,7 @@ import * as fs from "fs-extra";
33import * as yamlParser from "js-yaml" ;
44import { getArg } from "./utils/args" ;
55import gitP , { SimpleGit } from "simple-git/promise" ;
6+ import { gitPCherryPick } from "./utils/cherryPick" ;
67import { getCommits , CommitLogObject } from "./utils/commits" ;
78
89async function validate ( args : string [ ] ) {
@@ -46,10 +47,18 @@ async function validate(args: string[]) {
4647 await fs . emptyDir ( tmpDir ) ;
4748 }
4849 const tempGit : SimpleGit = gitP ( tmpDir ) ;
50+
51+ console . log ( Object . keys ( gitP ) ) ;
52+
4953 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 ) ;
5058
5159 // VALIDATE TUTORIAL TESTS
5260 if ( commits . INIT ) {
61+ cherryPick ( commits . INIT ) ;
5362 }
5463
5564 // run test runner setup command(s)
@@ -71,7 +80,7 @@ async function validate(args: string[]) {
7180 console . error ( e . message ) ;
7281 } finally {
7382 // cleanup
74- await fs . emptyDir ( tmpDir ) ;
83+ // await fs.emptyDir(tmpDir);
7584 }
7685}
7786
0 commit comments