add remove repository function
This commit is contained in:
parent
c4421bcd9f
commit
dbfed75287
|
@ -53,3 +53,7 @@ function createAndPublishNewBranch(repoPath){
|
|||
}
|
||||
)
|
||||
}
|
||||
|
||||
export function removeRepo(repoPath){
|
||||
exec("rm -r "+repoPath);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import { exec } from 'child_process';
|
||||
import { SimpleConsoleLogger } from 'typeorm'
|
||||
import {cloneRepo, commitRepo, pushRepo} from './gitClient'
|
||||
import {cloneRepo, commitRepo, pushRepo, removeRepo} from './gitClient'
|
||||
|
||||
//Sample usage
|
||||
cloneRepo('https://git.csclub.uwaterloo.ca/www/library.git', (temporaryDir) => {
|
||||
//temporaryDir is the temp directory name
|
||||
|
||||
|
||||
// exec("touch "+ temporaryDir + "/thing.js"); (add a new file to the directory)
|
||||
commitRepo(temporaryDir); // commit to the directory
|
||||
pushRepo(temporaryDir); // push to the directory
|
||||
removeRepo(temporaryDir); // remove the directory
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue