Skip to content

Commit f491b5c

Browse files
committed
Use depth=1 for cloning
Signed-off-by: Charles LESECQ <[email protected]>
1 parent fce33e3 commit f491b5c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v23.0.8
1+
v24.0.11

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@ async function build (cmd) {
8282
// Clone server repo and checkout to provided version
8383
const buildGit = git(buildDir);
8484
logMessage("Server: Cloning Repo");
85-
await buildGit.clone(config.repo, config.name, ['--recursive']);
85+
await buildGit.clone(config.repo, config.name, { '--recursive': null, '--depth': 1, '--branch': version });
8686
logMessage("Server: Clone Complete");
8787
const serverPath = `${buildDir}/${config.name}`;
8888
const serverGit = git(serverPath);
89-
await serverGit.checkout(version);
9089
await serverGit.submoduleUpdate();
9190
const versionHash = await serverGit.revparse(['HEAD']);
9291
await fs.writeFile(`${serverPath}/version.php`, versionFile((await fs.readFile(`${serverPath}/version.php`)).toString(), versionHash, { versionString: config.versionString, updateChannel: config.updateChannel }));
@@ -195,10 +194,9 @@ async function addApp (appName, appsDir, appConfig) {
195194
}
196195
if (appConfig.repo) {
197196
logMessage(`${appName}: Cloning repo`);
198-
await git(appsDir).clone(appConfig.repo, appName, ['--recursive']);
197+
await git(appsDir).clone(appConfig.repo, appName, { '--recursive': null, '--depth': 1, '--branch': appConfig.version });
199198
logMessage(`${appName}: Repo clone done`);
200199
const appGit = git(appDir);
201-
await appGit.checkout(appConfig.version);
202200
await appGit.submoduleUpdate();
203201
}
204202

0 commit comments

Comments
 (0)