Skip to content

Commit

Permalink
Merge pull request #487 from OctopusDeploy/linux-dev-xp
Browse files Browse the repository at this point in the history
Improve development experience in non-windows environments
  • Loading branch information
TomPeters authored Nov 27, 2019
2 parents 663ddf7 + f53a3b5 commit 9c1425a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions source/Octopus.Client.E2ETests/NuSpecDependenciesFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class NuSpecDependenciesFixture
public void OneTimeSetUp()
{
var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().FullLocalPath());
var artifactsFolder = Path.GetFullPath(Path.Combine(path, @"..\..\..\..\..\artifacts"));
var artifactsFolder = Path.GetFullPath(Path.Combine(path, "..", "..", "..", "..", "..", "artifacts"));
var package = Directory.EnumerateFiles(artifactsFolder , "Octopus.Client.*.nupkg").FirstOrDefault();
if (package == null)
Assert.Fail($"Couldn't find built nuget package with name 'Octopus.Client.*.nupkg' at '{artifactsFolder }'");
Expand All @@ -47,7 +47,7 @@ public void OneTimeSetUp()
}
}

var sourceFolder = Path.GetFullPath(Path.Combine(path, @"..\..\..\..\..\source\Octopus.Client"));
var sourceFolder = Path.GetFullPath(Path.Combine(path, "..", "..", "..", "..", "..", "source", "Octopus.Client"));
var projectFile = Directory.EnumerateFiles(sourceFolder , "Octopus.Client.csproj").FirstOrDefault();
if (projectFile == null)
Assert.Fail($"Couldn't find built c# project file with name 'Octopus.Client.csproj' at '{artifactsFolder }'");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netcoreapp2.0</TargetFrameworks>
<AssemblyName>Octopus.Client.E2ETests</AssemblyName>
<PackageId>Octopus.Client.E2ETests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>
<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net45;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DefineConstants>$(DefineConstants);SUPPORTS_ILMERGE</DefineConstants>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/Octopus.Client.E2ETests/TestHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class TestHelpers
internal static string GetNuGetPackage()
{
var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().FullLocalPath());
var artifactsFolder = Path.GetFullPath(Path.Combine(path, @"..\..\..\..\..\artifacts"));
var artifactsFolder = Path.GetFullPath(Path.Combine(path, "..", "..", "..", "..", "..", "artifacts"));
var package = Directory.EnumerateFiles(artifactsFolder, "Octopus.Client.*.nupkg").FirstOrDefault();
if (package == null)
Assert.Fail($"Couldn't find built nuget package with name 'Octopus.Client.*.nupkg' at '{artifactsFolder}'");
Expand Down
7 changes: 6 additions & 1 deletion source/Octopus.Client.Tests/Octopus.Client.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp2.0</TargetFrameworks>
<AssemblyName>Octopus.Client.Tests</AssemblyName>
<PackageId>Octopus.Client.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>
<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net452;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<RuntimeIdentifier>win7-x86</RuntimeIdentifier> <!-- So that libuv is copied correctly -->
Expand Down
7 changes: 6 additions & 1 deletion source/Octopus.Client/Octopus.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -18,6 +17,12 @@

This package contains the client library for the HTTP API in Octopus.</Description>
</PropertyGroup>
<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DebugType>embedded</DebugType>
<DefineConstants>$(DefineConstants)</DefineConstants>
Expand Down

0 comments on commit 9c1425a

Please sign in to comment.