Add output caching for Forge 1.13+.
CHANGES - Forge installer is no longer stored to the work directory. It is now stored in a cache folder corresponding to the artifact version. - Installer output is now cached by default - Added options to generate distro. - --discardOutput Delete cached output after it is no longer required. May be useful if disk space is limited. - --invalidateCache Invalidate and delete existing caches as they are encountered. Requires fresh cache generation. - Both options are false by default. - To invalide a single version, manually delete the folder. - Old functionality is essentially g distro --discardOutput --invalidateCache.
This commit is contained in:
@@ -18,7 +18,9 @@ export class ServerStructure extends BaseModelStructure<Server> {
|
||||
|
||||
constructor(
|
||||
absoluteRoot: string,
|
||||
baseUrl: string
|
||||
baseUrl: string,
|
||||
private discardOutput: boolean,
|
||||
private invalidateCache: boolean
|
||||
) {
|
||||
super(absoluteRoot, '', 'servers', baseUrl)
|
||||
}
|
||||
@@ -133,7 +135,9 @@ export class ServerStructure extends BaseModelStructure<Server> {
|
||||
serverMeta.forge.version,
|
||||
dirname(this.containerDirectory),
|
||||
'',
|
||||
this.baseUrl
|
||||
this.baseUrl,
|
||||
this.discardOutput,
|
||||
this.invalidateCache
|
||||
)
|
||||
|
||||
// Resolve forge
|
||||
|
||||
Reference in New Issue
Block a user