Fixed tabs to 2 spaces instead of 4 for our targets files
This commit is contained in:
parent
b8ccb0d1ae
commit
52e9475be8
2 changed files with 165 additions and 165 deletions
|
@ -1,180 +1,180 @@
|
|||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="compile/Microsoft.DotNet.Cli.Archive.targets" />
|
||||
<Import Project="compile/Microsoft.DotNet.Cli.Archive.targets" />
|
||||
|
||||
<UsingTask TaskName="FixModeFlags" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="RemoveAssetFromDepsPackages" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CleanPublishOutput" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="SharedFrameworkNameVersionPath" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CrossgenDirectory" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="FixModeFlags" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="RemoveAssetFromDepsPackages" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CleanPublishOutput" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="SharedFrameworkNameVersionPath" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CrossgenDirectory" AssemblyFile="$(CLIBuildDll)" />
|
||||
|
||||
<Target Name="Compile" DependsOnTargets="BuildDotnetCliBuildFramework;
|
||||
Init;
|
||||
SetupStage;
|
||||
CompileStage;
|
||||
BuildProjectsForNuGetPackages;
|
||||
GenerateNuGetPackagesArchive">
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupStage">
|
||||
<ItemGroup>
|
||||
<CompileStageInputs Include="$(RepoRoot)/src/**/*.cs" Exclude="$(RepoRoot)/src/**/obj/**/*.cs" />
|
||||
<CompileStageInputs Include="$(RepoRoot)/src/**/project.json;$(RepoRoot)/src/**/project.lock.json" />
|
||||
<Target Name="Compile" DependsOnTargets="BuildDotnetCliBuildFramework;
|
||||
Init;
|
||||
SetupStage;
|
||||
CompileStage;
|
||||
BuildProjectsForNuGetPackages;
|
||||
GenerateNuGetPackagesArchive">
|
||||
</Target>
|
||||
|
||||
<Stage Include="Stage1">
|
||||
<Inputs>@(CompileStageInputs)</Inputs>
|
||||
<StageDirectory>$(Stage1Directory)</StageDirectory>
|
||||
<StageSymbolsDirectory>$(Stage1SymbolsDirectory)</StageSymbolsDirectory>
|
||||
<DotnetExe>$(Stage0Path)/dotnet.exe</DotnetExe>
|
||||
</Stage>
|
||||
<Stage Include="Stage2">
|
||||
<Inputs>@(CompileStageInputs)</Inputs>
|
||||
<StageDirectory>$(Stage2Directory)</StageDirectory>
|
||||
<StageSymbolsDirectory>$(Stage2SymbolsDirectory)</StageSymbolsDirectory>
|
||||
<DotnetExe>$(DotnetStage1)</DotnetExe>
|
||||
</Stage>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<Target Name="SetupStage">
|
||||
<ItemGroup>
|
||||
<CompileStageInputs Include="$(RepoRoot)/src/**/*.cs" Exclude="$(RepoRoot)/src/**/obj/**/*.cs" />
|
||||
<CompileStageInputs Include="$(RepoRoot)/src/**/project.json;$(RepoRoot)/src/**/project.lock.json" />
|
||||
|
||||
<Target Name="CompileStage"
|
||||
Inputs="%(Stage.Identity);%(Stage.Inputs)"
|
||||
Outputs="%(StageDirectory)/sdk/$(NugetVersion)/dotnet.dll">
|
||||
<PropertyGroup>
|
||||
<SrcDirectory>$(RepoRoot)/src</SrcDirectory>
|
||||
<Stage Include="Stage1">
|
||||
<Inputs>@(CompileStageInputs)</Inputs>
|
||||
<StageDirectory>$(Stage1Directory)</StageDirectory>
|
||||
<StageSymbolsDirectory>$(Stage1SymbolsDirectory)</StageSymbolsDirectory>
|
||||
<DotnetExe>$(Stage0Path)/dotnet.exe</DotnetExe>
|
||||
</Stage>
|
||||
<Stage Include="Stage2">
|
||||
<Inputs>@(CompileStageInputs)</Inputs>
|
||||
<StageDirectory>$(Stage2Directory)</StageDirectory>
|
||||
<StageSymbolsDirectory>$(Stage2SymbolsDirectory)</StageSymbolsDirectory>
|
||||
<DotnetExe>$(DotnetStage1)</DotnetExe>
|
||||
</Stage>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<ExeSuffix Condition=" '$(OSName)' == 'win' ">.exe</ExeSuffix>
|
||||
<ExeSuffix Condition=" '$(OSName)' != 'win' "></ExeSuffix>
|
||||
<Target Name="CompileStage"
|
||||
Inputs="%(Stage.Identity);%(Stage.Inputs)"
|
||||
Outputs="%(StageDirectory)/sdk/$(NugetVersion)/dotnet.dll">
|
||||
<PropertyGroup>
|
||||
<SrcDirectory>$(RepoRoot)/src</SrcDirectory>
|
||||
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' != 'win' ">lib</DynamicLibPrefix>
|
||||
<ExeSuffix Condition=" '$(OSName)' == 'win' ">.exe</ExeSuffix>
|
||||
<ExeSuffix Condition=" '$(OSName)' != 'win' "></ExeSuffix>
|
||||
|
||||
<DynamicLibSuffix Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibSuffix>
|
||||
<DynamicLibSuffix Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibSuffix>
|
||||
<DynamicLibSuffix Condition=" '$(DynamicLibSuffix)' == '' ">.so</DynamicLibSuffix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' != 'win' ">lib</DynamicLibPrefix>
|
||||
|
||||
<DotnetHostBaseName>dotnet$(ExeSuffix)</DotnetHostBaseName>
|
||||
<DotnetHostFxrBaseName>$(DynamicLibPrefix)hostfxr$(DynamicLibSuffix)</DotnetHostFxrBaseName>
|
||||
<HostPolicyBaseName>$(DynamicLibPrefix)hostpolicy$(DynamicLibSuffix)</HostPolicyBaseName>
|
||||
<DynamicLibSuffix Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibSuffix>
|
||||
<DynamicLibSuffix Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibSuffix>
|
||||
<DynamicLibSuffix Condition=" '$(DynamicLibSuffix)' == '' ">.so</DynamicLibSuffix>
|
||||
|
||||
<StageDirectory>%(Stage.StageDirectory)</StageDirectory>
|
||||
<StageSymbolsDirectory>%(Stage.StageSymbolsDirectory)</StageSymbolsDirectory>
|
||||
<SdkOutputDirectory>$(StageDirectory)/sdk/$(NugetVersion)</SdkOutputDirectory>
|
||||
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
|
||||
<BinaryToCorehostifyOutDir>$(SdkOutputDirectory)/$(BinaryToCorehostifyRelDir)</BinaryToCorehostifyOutDir>
|
||||
<MSBuildTargetsDirectory>$(SdkOutputDirectory)/runtimes/any/native</MSBuildTargetsDirectory>
|
||||
</PropertyGroup>
|
||||
<DotnetHostBaseName>dotnet$(ExeSuffix)</DotnetHostBaseName>
|
||||
<DotnetHostFxrBaseName>$(DynamicLibPrefix)hostfxr$(DynamicLibSuffix)</DotnetHostFxrBaseName>
|
||||
<HostPolicyBaseName>$(DynamicLibPrefix)hostpolicy$(DynamicLibSuffix)</HostPolicyBaseName>
|
||||
|
||||
<ItemGroup>
|
||||
<BinObj Include="$(SrcDirectory)/**/bin/**/*" />
|
||||
<BinObj Include="$(SrcDirectory)/**/obj/**/*" />
|
||||
<FilesToRemoveFromStageDirectory Include="$(StageDirectory)/**/*" />
|
||||
<StageDirectory>%(Stage.StageDirectory)</StageDirectory>
|
||||
<StageSymbolsDirectory>%(Stage.StageSymbolsDirectory)</StageSymbolsDirectory>
|
||||
<SdkOutputDirectory>$(StageDirectory)/sdk/$(NugetVersion)</SdkOutputDirectory>
|
||||
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
|
||||
<BinaryToCorehostifyOutDir>$(SdkOutputDirectory)/$(BinaryToCorehostifyRelDir)</BinaryToCorehostifyOutDir>
|
||||
<MSBuildTargetsDirectory>$(SdkOutputDirectory)/runtimes/any/native</MSBuildTargetsDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<SharedFramework Include="$(IntermediateDirectory)/sharedFrameworkPublish/**/*.*" />
|
||||
<ItemGroup>
|
||||
<BinObj Include="$(SrcDirectory)/**/bin/**/*" />
|
||||
<BinObj Include="$(SrcDirectory)/**/obj/**/*" />
|
||||
<FilesToRemoveFromStageDirectory Include="$(StageDirectory)/**/*" />
|
||||
|
||||
<BinariesToRemove Include="csc" />
|
||||
<BinariesToRemove Include="vbc" />
|
||||
<SharedFramework Include="$(IntermediateDirectory)/sharedFrameworkPublish/**/*.*" />
|
||||
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.targets" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.Targets" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.props" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.overridetasks" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.tasks" />
|
||||
</ItemGroup>
|
||||
<BinariesToRemove Include="csc" />
|
||||
<BinariesToRemove Include="vbc" />
|
||||
|
||||
<SharedFrameworkNameVersionPath RootOutputDirectory="$(StageDirectory)">
|
||||
<Output TaskParameter="OutputSharedFrameworkNameVersionPath" PropertyName="SharedFrameworkNameVersionPath" />
|
||||
</SharedFrameworkNameVersionPath>
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.targets" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.Targets" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.props" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.overridetasks" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.tasks" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(BinObj)" />
|
||||
<SharedFrameworkNameVersionPath RootOutputDirectory="$(StageDirectory)">
|
||||
<Output TaskParameter="OutputSharedFrameworkNameVersionPath" PropertyName="SharedFrameworkNameVersionPath" />
|
||||
</SharedFrameworkNameVersionPath>
|
||||
|
||||
<Delete Files="@(FilesToRemoveFromStageDirectory)" />
|
||||
<RemoveDir Directories="$(StageDirectory)" />
|
||||
<MakeDir Directories="$(StageDirectory)"/>
|
||||
<Delete Files="@(BinObj)" />
|
||||
|
||||
<!-- CopySharedFramework -->
|
||||
<Copy SourceFiles="@(SharedFramework)"
|
||||
DestinationFiles="@(SharedFramework->'$(StageDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<!-- Publish DotNet -->
|
||||
<Exec Command="%(Stage.DotnetExe) publish
|
||||
--native-subdirectory
|
||||
--output $(SdkOutputDirectory)
|
||||
--configuration $(Configuration)
|
||||
--version-suffix $(CommitCount)
|
||||
$(SrcDirectory)/dotnet" />
|
||||
<Delete Files="@(FilesToRemoveFromStageDirectory)" />
|
||||
<RemoveDir Directories="$(StageDirectory)" />
|
||||
<MakeDir Directories="$(StageDirectory)"/>
|
||||
|
||||
<!-- Corehostify Binaries -->
|
||||
<FixModeFlags Dir="$(SdkOutputDirectory)" />
|
||||
<!-- CopySharedFramework -->
|
||||
<Copy SourceFiles="@(SharedFramework)"
|
||||
DestinationFiles="@(SharedFramework->'$(StageDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<!-- Publish DotNet -->
|
||||
<Exec Command="%(Stage.DotnetExe) publish
|
||||
--native-subdirectory
|
||||
--output $(SdkOutputDirectory)
|
||||
--configuration $(Configuration)
|
||||
--version-suffix $(CommitCount)
|
||||
$(SrcDirectory)/dotnet" />
|
||||
|
||||
<Exec Command="%(Stage.DotnetExe) publish
|
||||
--output $(SdkOutputDirectory)
|
||||
--framework netcoreapp1.0
|
||||
$(SrcDirectory)/compilers" />
|
||||
<!-- Corehostify Binaries -->
|
||||
<FixModeFlags Dir="$(SdkOutputDirectory)" />
|
||||
|
||||
<Copy SourceFiles="$(BinaryToCorehostifyOutDir)/csc.exe"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.dll" />
|
||||
<Exec Command="%(Stage.DotnetExe) publish
|
||||
--output $(SdkOutputDirectory)
|
||||
--framework netcoreapp1.0
|
||||
$(SrcDirectory)/compilers" />
|
||||
|
||||
<Move SourceFiles="$(BinaryToCorehostifyOutDir)/csc.exe"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.exe" />
|
||||
<Copy SourceFiles="$(BinaryToCorehostifyOutDir)/csc.exe"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.dll" />
|
||||
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/compilers.deps.json"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.deps.json" />
|
||||
<Move SourceFiles="$(BinaryToCorehostifyOutDir)/csc.exe"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.exe" />
|
||||
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/compilers.runtimeconfig.json"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.runtimeconfig.json" />
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/compilers.deps.json"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.deps.json" />
|
||||
|
||||
<ChangeEntryPointLibraryName
|
||||
DepsFile="$(SdkOutputDirectory)/csc.deps.json"
|
||||
NewName="csc.deps.json" />
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/compilers.runtimeconfig.json"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.runtimeconfig.json" />
|
||||
|
||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/csc.deps.json"
|
||||
SectionName="runtimeTargets"
|
||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(BinariesToRemove.Identity).exe" />
|
||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/dotnet.deps.json"
|
||||
SectionName="runtimeTargets"
|
||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(BinariesToRemove.Identity).exe" />
|
||||
<ChangeEntryPointLibraryName
|
||||
DepsFile="$(SdkOutputDirectory)/csc.deps.json"
|
||||
NewName="csc.deps.json" />
|
||||
|
||||
<!-- cleanup compilers project output we don't need -->
|
||||
<CleanPublishOutput Path="$(SdkOutputDirectory)"
|
||||
Name="compilers"
|
||||
DeleteRuntimeConfigJson="true"
|
||||
DeleteDepsJson="true" />
|
||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/csc.deps.json"
|
||||
SectionName="runtimeTargets"
|
||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(BinariesToRemove.Identity).exe" />
|
||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/dotnet.deps.json"
|
||||
SectionName="runtimeTargets"
|
||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(BinariesToRemove.Identity).exe" />
|
||||
|
||||
<!-- Copy Host to SDK Directory -->
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeSuffix)" />
|
||||
<!-- cleanup compilers project output we don't need -->
|
||||
<CleanPublishOutput Path="$(SdkOutputDirectory)"
|
||||
Name="compilers"
|
||||
DeleteRuntimeConfigJson="true"
|
||||
DeleteDepsJson="true" />
|
||||
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostFxrBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/$(DotnetHostFxrBaseName)" />
|
||||
<!-- Copy Host to SDK Directory -->
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeSuffix)" />
|
||||
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(HostPolicyBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostFxrBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/$(DotnetHostFxrBaseName)" />
|
||||
|
||||
<CrossgenDirectory SharedFrameworkNameVersionPath="$(SharedFrameworkNameVersionPath)"
|
||||
SdkOutputDirectory="$(SdkOutputDirectory)" />
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(HostPolicyBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
|
||||
|
||||
<!-- Generate .version file -->
|
||||
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
|
||||
Lines="$(CommitHash)$(NewLine)$(NugetVersion)$(NewLine)"
|
||||
Overwrite="true" />
|
||||
<CrossgenDirectory SharedFrameworkNameVersionPath="$(SharedFrameworkNameVersionPath)"
|
||||
SdkOutputDirectory="$(SdkOutputDirectory)" />
|
||||
|
||||
<Copy SourceFiles="@(MSBuildTargetsToCopy)"
|
||||
DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<!-- Generate .version file -->
|
||||
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
|
||||
Lines="$(CommitHash)$(NewLine)$(NugetVersion)$(NewLine)"
|
||||
Overwrite="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(StageDirectory)/sdk/**/vbc.exe" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(MSBuildTargetsToCopy)"
|
||||
DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(StageDirectory)/sdk/**/vbc.exe" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToCopy Include="$(StageDirectory)/**/*.*" />
|
||||
<PdbsToClean Include="$(StageDirectory)/sdk/**/*.pdb" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
|
||||
<Copy SourceFiles="@(FilesToCopy)"
|
||||
DestinationFiles="@(FilesToCopy->'$(StageSymbolsDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<ItemGroup>
|
||||
<FilesToCopy Include="$(StageDirectory)/**/*.*" />
|
||||
<PdbsToClean Include="$(StageDirectory)/sdk/**/*.pdb" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(PdbsToClean)" />
|
||||
</Target>
|
||||
<Copy SourceFiles="@(FilesToCopy)"
|
||||
DestinationFiles="@(FilesToCopy->'$(StageSymbolsDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<Delete Files="@(PdbsToClean)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -4,46 +4,46 @@
|
|||
CompressNuGetPackagesArchive"
|
||||
Inputs="$(Stage2Directory)/sdk/**/dotnet.dll"
|
||||
Outputs="$(FinalArchive)">
|
||||
<Message Text="Generating NuGet Packages Archive" />
|
||||
<Message Text="Generating NuGet Packages Archive" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreNuGetPackagesArchive"
|
||||
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs">
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
|
||||
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
|
||||
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
<RemoveDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)" />
|
||||
<MakeDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)"/>
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
<RemoveDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)" />
|
||||
<MakeDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)"/>
|
||||
|
||||
<Exec Command="$(DotnetStage2) new" WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
||||
<Exec Command="$(DotnetStage2) restore --packages $(NuGetPackagesArchiveFolder)"
|
||||
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
||||
<Exec Command="$(DotnetStage2) new" WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
||||
<Exec Command="$(DotnetStage2) restore --packages $(NuGetPackagesArchiveFolder)"
|
||||
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CompressNuGetPackagesArchive"
|
||||
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs">
|
||||
<Delete Files="$(IntermediateArchive);$(IntermediateArchive).zip" />
|
||||
<Delete Files="$(IntermediateArchive);$(IntermediateArchive).zip" />
|
||||
|
||||
<Message Text="Publishing Archiver" />
|
||||
<Exec Command="$(DotnetStage2) publish --output $(ToolsOutputDirectory) --configuration $(Configuration)"
|
||||
WorkingDirectory="$(RepoRoot)/tools/Archiver" />
|
||||
<Message Text="Publishing Archiver" />
|
||||
<Exec Command="$(DotnetStage2) publish --output $(ToolsOutputDirectory) --configuration $(Configuration)"
|
||||
WorkingDirectory="$(RepoRoot)/tools/Archiver" />
|
||||
|
||||
<Exec Command="$(ArchiverExe) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
||||
<Exec Command="$(ArchiverExe) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
||||
|
||||
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
|
||||
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
||||
DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
|
||||
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
|
||||
<ArchiverExe>$(ToolsOutputDirectory)/Archiver</ArchiverExe>
|
||||
<IntermediateArchive>$(IntermediateDirectory)/nuGetPackagesArchive.lzma</IntermediateArchive>
|
||||
<FinalArchive>$(Stage2Directory)/nuGetPackagesArchive.lzma</FinalArchive>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
|
||||
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
|
||||
<ArchiverExe>$(ToolsOutputDirectory)/Archiver</ArchiverExe>
|
||||
<IntermediateArchive>$(IntermediateDirectory)/nuGetPackagesArchive.lzma</IntermediateArchive>
|
||||
<FinalArchive>$(Stage2Directory)/nuGetPackagesArchive.lzma</FinalArchive>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
Loading…
Reference in a new issue