Move temp delete elsewhere
This commit is contained in:
parent
a089369216
commit
3adcbd10f7
|
|
@ -9,6 +9,22 @@ dotnetDir=''
|
||||||
Optional. The directory in which to execute the `dotnet` command.
|
Optional. The directory in which to execute the `dotnet` command.
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
|
@{
|
||||||
|
//temporary delete cross-gen files
|
||||||
|
var installDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR");
|
||||||
|
if (string.IsNullOrEmpty(installDir))
|
||||||
|
{
|
||||||
|
installDir = Path.Combine(Environment.GetEnvironmentVariable("LocalAppData"), "Microsoft", "dotnet", "cli");
|
||||||
|
}
|
||||||
|
|
||||||
|
var files = Directory.GetFiles(installDir, "*.ni.*", SearchOption.AllDirectories);
|
||||||
|
foreach (var file in files.Where(f => !f.Contains("mscorlib")))
|
||||||
|
{
|
||||||
|
Console.WriteLine("Deleting {0}", file);
|
||||||
|
File.Delete(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
default currentDir = '${Directory.GetCurrentDirectory()}'
|
default currentDir = '${Directory.GetCurrentDirectory()}'
|
||||||
default dotnetDir = '${ currentDir }'
|
default dotnetDir = '${ currentDir }'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,20 +94,6 @@ default NUGET_FEED = 'https://api.nuget.org/v3/index.json'
|
||||||
|
|
||||||
#build-compile target='compile' if='Directory.Exists("src")'
|
#build-compile target='compile' if='Directory.Exists("src")'
|
||||||
@{
|
@{
|
||||||
//temporary delete cross-gen files
|
|
||||||
var installDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR");
|
|
||||||
if (string.IsNullOrEmpty(installDir))
|
|
||||||
{
|
|
||||||
installDir = Path.Combine(Environment.GetEnvironmentVariable("LocalAppData"), "Microsoft", "dotnet", "cli");
|
|
||||||
}
|
|
||||||
|
|
||||||
var files = Directory.GetFiles(installDir, "*.ni.*", SearchOption.AllDirectories);
|
|
||||||
foreach (var file in files.Where(f => !f.Contains("mscorlib")))
|
|
||||||
{
|
|
||||||
Console.WriteLine("Deleting {0}", file);
|
|
||||||
File.Delete(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
var projectFiles = Files.Include("src/**/project.json").ToList();
|
var projectFiles = Files.Include("src/**/project.json").ToList();
|
||||||
projectFiles.ForEach(projectFile => DotnetPack(projectFile, BUILD_DIR, Configuration));
|
projectFiles.ForEach(projectFile => DotnetPack(projectFile, BUILD_DIR, Configuration));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue