Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Rearrange output folders #7522

Merged
merged 25 commits into from
Sep 2, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ac99830
Support new output directory layout
dsplaisted Aug 4, 2017
ae0aa8e
Move dir.props to auto-imported Directory.Build.props
dsplaisted Aug 4, 2017
13da213
Support new artifacts layout in tests and other build logic
dsplaisted Aug 10, 2017
4ccf1b6
Use separate folders for different cases of a theory
dsplaisted Aug 10, 2017
61e68e6
Show path when directory delete fails in test setup
dsplaisted Aug 10, 2017
884a483
Copy empty Directory.Build.props to artifacts folder during build ins…
dsplaisted Aug 11, 2017
12f8c23
Generate properties to pass to the next stage of the build
dsplaisted Aug 11, 2017
e4777c0
Update expected SDK version test to work with multiple stages
dsplaisted Aug 11, 2017
c6e4c8f
Rename Stage0 build variables to PreviousStage
dsplaisted Aug 11, 2017
2222290
Update MSI tests to use new output directory layout
dsplaisted Aug 15, 2017
107252e
Merge upstream changes
dsplaisted Aug 28, 2017
fc6f2f3
Fix DotNetRestore after merging upstream changes
dsplaisted Aug 28, 2017
dcb3a7a
Use shorter output paths to avoid max path issues on Windows
dsplaisted Aug 28, 2017
103b8a6
Fix test asset that had NuGet.Config pointing to incorrect directory
dsplaisted Aug 29, 2017
9fb5f74
Fix multiple tests using same output path
dsplaisted Aug 29, 2017
fd66cdc
Fix test assets with NuGet.Config files pointing to old layout
dsplaisted Aug 29, 2017
4c3b13e
Use a shorter path for test working directories, get rid of Stage 0 p…
dsplaisted Aug 30, 2017
ac67434
Fix debian package generation
dsplaisted Sep 1, 2017
9b33167
Merge upstream changes
dsplaisted Sep 1, 2017
546eff2
Delete outdated comment
dsplaisted Sep 1, 2017
27dc803
Fix test that depended on old output directory layout
dsplaisted Sep 1, 2017
97b7553
Rename output folder from out to bin
dsplaisted Sep 1, 2017
88319a7
Remove duplicate import
dsplaisted Sep 1, 2017
728cea2
Update signing.proj to use new output paths, and import common repo p…
dsplaisted Sep 2, 2017
6e0646f
Update environment variables for EndToEnd test run on Debian package
dsplaisted Sep 2, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions test/dotnet.Tests/VersionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GivenDotnetSdk : TestBase
[Fact]
public void VersionCommandDisplaysCorrectVersion()
{
var versionFilePath = Path.Combine(AppContext.BaseDirectory, ".version");
var versionFilePath = Path.Combine(AppContext.BaseDirectory, "ExpectedSdkVersion.txt");
var version = GetVersionFromFile(versionFilePath);

CommandResult result = new DotnetCommand()
Expand All @@ -31,14 +31,8 @@ private string GetVersionFromFile(string versionFilePath)
{
using (var reader = new StreamReader(File.OpenRead(versionFilePath)))
{
SkipCommit(reader);
return reader.ReadLine();
}
}

private void SkipCommit(StreamReader reader)
{
reader.ReadLine();
}
}
}
32 changes: 28 additions & 4 deletions test/dotnet.Tests/dotnet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,35 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="$(SdkOutputDirectory)\.version">
<Link>.version</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Target Name="WriteExpectedVersion"
BeforeTargets="BeforeBuild"
DependsOnTargets="PrepareForBuild">

<PropertyGroup>
<ExpectedVersionFileInIntermediateFolder>$(IntermediateOutputPath)ExpectedSdkVersion.txt</ExpectedVersionFileInIntermediateFolder>

<VersionFileContent>$(SdkVersion)</VersionFileContent>
<ExistingVersionFileContent Condition=" Exists('$(ExpectedVersionFileInIntermediateFolder)') ">
$([System.IO.File]::ReadAllText($(ExpectedVersionFileInIntermediateFolder)))
</ExistingVersionFileContent>

<ShouldOverwriteVersionFile>false</ShouldOverwriteVersionFile>
<ShouldOverwriteVersionFile
Condition=" '$(ExistingVersionFileContent.Trim())' != '$(VersionFileContent.Trim())' ">true</ShouldOverwriteVersionFile>
</PropertyGroup>

<WriteLinesToFile File="$(ExpectedVersionFileInIntermediateFolder)"
Lines="$(VersionFileContent)"
Condition=" '$(ShouldOverwriteVersionFile)' == 'true' "

This comment was marked as spam.

Overwrite="true" />

<ItemGroup>
<Content Include="$(ExpectedVersionFileInIntermediateFolder)" CopyToOutputDirectory="PreserveNewest" />
<FileWrites Include="$(ExpectedVersionFileInIntermediateFolder)" />
</ItemGroup>
</Target>

<ItemGroup>
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
Expand Down