@@ -82,11 +82,10 @@ async function build (cmd) {
82
82
// Clone server repo and checkout to provided version
83
83
const buildGit = git ( buildDir ) ;
84
84
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 } ) ;
86
86
logMessage ( "Server: Clone Complete" ) ;
87
87
const serverPath = `${ buildDir } /${ config . name } ` ;
88
88
const serverGit = git ( serverPath ) ;
89
- await serverGit . checkout ( version ) ;
90
89
await serverGit . submoduleUpdate ( ) ;
91
90
const versionHash = await serverGit . revparse ( [ 'HEAD' ] ) ;
92
91
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) {
195
194
}
196
195
if ( appConfig . repo ) {
197
196
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 } ) ;
199
198
logMessage ( `${ appName } : Repo clone done` ) ;
200
199
const appGit = git ( appDir ) ;
201
- await appGit . checkout ( appConfig . version ) ;
202
200
await appGit . submoduleUpdate ( ) ;
203
201
}
204
202
0 commit comments