From 3b488b6ed2fe608d9a5aa706e47a32feeacc1a62 Mon Sep 17 00:00:00 2001 From: Geert-Jan Giezeman <G.J.Giezeman@uu.nl> Date: Wed, 27 Nov 2024 16:21:51 +0100 Subject: [PATCH 1/2] Incorporated changes to submodules (spider and parser). --- .gitmodules | 2 +- src/modules/searchSECO-parser | 2 +- src/modules/searchSECO-spider | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/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..3700cce 160000 --- a/src/modules/searchSECO-spider +++ b/src/modules/searchSECO-spider @@ -1 +1 @@ -Subproject commit deae2c86cedaec1909cd3fb17540d74431e01482 +Subproject commit 3700cceab10be15e57d8e1dbb40c14d1ed0c040b From 6d205568b9a2223cbdb3358b1927293f27f78e45 Mon Sep 17 00:00:00 2001 From: Geert-Jan Giezeman <G.J.Giezeman@uu.nl> Date: Thu, 28 Nov 2024 10:05:29 +0100 Subject: [PATCH 2/2] Remove directory where repository is downloaded after the work is done. --- src/Command.ts | 3 +++ src/ModuleFacade.ts | 7 +++++++ src/modules/searchSECO-spider | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) 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-spider b/src/modules/searchSECO-spider index 3700cce..8c1576f 160000 --- a/src/modules/searchSECO-spider +++ b/src/modules/searchSECO-spider @@ -1 +1 @@ -Subproject commit 3700cceab10be15e57d8e1dbb40c14d1ed0c040b +Subproject commit 8c1576f27d61a445df601d03bf27465468ece544