diff --git a/.gitmodules b/.gitmodules index 39fc23b..589e569 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "src/modules/searchSECO-spider"] path = src/modules/searchSECO-spider - url = https://github.com/SecureSECODAO/searchSECO-spider + url = ../searchSECO-spider [submodule "src/modules/searchSECO-databaseAPI"] path = src/modules/searchSECO-databaseAPI url = https://github.com/SecureSECODAO/searchSECO-databaseAPI diff --git a/src/Command.ts b/src/Command.ts index 8d17025..f9a1de8 100644 --- a/src/Command.ts +++ b/src/Command.ts @@ -193,6 +193,8 @@ export default abstract class Command { const printer = new MatchPrinter(); await printer.PrintHashMatches(url, metadata.id, projectMethods, projectBlaming, checkResponse, dbProjectInfo, dbAuthorInfo); printer.Close(); + await this._moduleFacade.ClearRepository(); + return true } @@ -263,6 +265,7 @@ export default abstract class Command { await this.loopThroughTags(tags, metadata, startingTime, jobID, jobTime); } */ + await this._moduleFacade.ClearRepository(); } /** diff --git a/src/ModuleFacade.ts b/src/ModuleFacade.ts index 78e8f08..87cf916 100644 --- a/src/ModuleFacade.ts +++ b/src/ModuleFacade.ts @@ -51,6 +51,13 @@ export default class ModuleFacade { return await this._spider.downloadRepo(url, this._filePath, branch); } + /** + * Uses the spider to clear a repository + * */ + public async ClearRepository() { + await this._spider.clearDirectory(this._filePath); + } + /** * Uses the spider to update the repository to a different tag, keeping track of unchanged files * @param prevTag The previous tag diff --git a/src/modules/searchSECO-parser b/src/modules/searchSECO-parser index fb21873..e03a411 160000 --- a/src/modules/searchSECO-parser +++ b/src/modules/searchSECO-parser @@ -1 +1 @@ -Subproject commit fb2187316f73ea8247055353d5d8ad9c284eb48e +Subproject commit e03a41195ba3e6e6997edcd3275dfb0a8a6293b2 diff --git a/src/modules/searchSECO-spider b/src/modules/searchSECO-spider index deae2c8..8c1576f 160000 --- a/src/modules/searchSECO-spider +++ b/src/modules/searchSECO-spider @@ -1 +1 @@ -Subproject commit deae2c86cedaec1909cd3fb17540d74431e01482 +Subproject commit 8c1576f27d61a445df601d03bf27465468ece544