mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 23:02:55 +01:00
Initial commit
Co-Authored-By: Eric Tuvesson <eric.tuvesson@gmail.com> Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com> Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com> Co-Authored-By: Anders Larsson <64838990+anders-topp@users.noreply.github.com> Co-Authored-By: Johan <4934465+joolsus@users.noreply.github.com> Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com> Co-Authored-By: victoratndl <99176179+victoratndl@users.noreply.github.com>
This commit is contained in:
32
scripts/noodl-editor/git/clean-up.ts
Normal file
32
scripts/noodl-editor/git/clean-up.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { unlinkSync } from 'fs-extra';
|
||||
import path from 'path';
|
||||
|
||||
export function gitCleanUp(options: { gitDir: string; architecture: string }) {
|
||||
if (process.platform === 'win32') {
|
||||
console.log('Noodl Build: Cleaning unneeded Git components…');
|
||||
const files = [
|
||||
'Bitbucket.Authentication.dll',
|
||||
'GitHub.Authentication.exe',
|
||||
'Microsoft.Alm.Authentication.dll',
|
||||
'Microsoft.Alm.Git.dll',
|
||||
'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll',
|
||||
'Microsoft.IdentityModel.Clients.ActiveDirectory.dll',
|
||||
'Microsoft.Vsts.Authentication.dll',
|
||||
'git-askpass.exe',
|
||||
'git-credential-manager.exe',
|
||||
'WebView2Loader.dll'
|
||||
];
|
||||
|
||||
const mingwFolder = options.architecture === 'x64' ? 'mingw64' : 'mingw32';
|
||||
const gitCoreDir = path.join(options.gitDir, mingwFolder, 'libexec', 'git-core');
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(gitCoreDir, file);
|
||||
try {
|
||||
unlinkSync(filePath);
|
||||
} catch (err) {
|
||||
// probably already cleaned up
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user