Skip to content

Commit

Permalink
Targetting .net 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Apr 10, 2018
1 parent 2f88035 commit d4f9d69
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</dependencies>
</metadata>
<files>
<file src="*" target="lib\netcoreapp2.0" />
<file src="netcoreapp2.0\Octopus.Core.Parsers.Hcl.dll" target="lib\netcoreapp2.0" />
<file src="net40\Octopus.Core.Parsers.Hcl.dll" target="lib\net40" />
</files>
</package>
14 changes: 7 additions & 7 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var artifactsDir = "./artifacts";
var assetDir = "./BuildAssets";
var globalAssemblyFile = "./source/Solution Items/VersionInfo.cs";
var solutionToBuild = "./source/Octopus.Core.Parsers.Hcl.sln";
var fileToPublish = "./source/Octopus.Core.Parsers.Hcl/bin/Release/netcoreapp2.0/Octopus.Core.Parsers.Hcl.dll";
var directoryToPublish = "./source/Octopus.Core.Parsers.Hcl/bin/Release";
var cleanups = new List<IDisposable>();


Expand All @@ -41,7 +41,7 @@ Setup(context =>
BuildSystem.TeamCity.SetBuildNumber(gitVersionInfo.NuGetVersion);
if(BuildSystem.IsRunningOnAppVeyor)
AppVeyor.UpdateBuildVersion(gitVersionInfo.NuGetVersion);
Information("Building Octopus.Core.Parsers.Hcl v{0}", nugetVersion);
Information("Building Octopus.CoreParsers.Hcl v{0}", nugetVersion);
});

Teardown(context =>
Expand Down Expand Up @@ -103,11 +103,11 @@ Task("__Build")
Task("__Pack")
.Does(() => {
var nugetPackDir = Path.Combine(publishDir, "nuget");
var nuspecFile = "Octopus.Core.Parsers.Hcl.nuspec";
var nuspecFile = "Octopus.CoreParsers.Hcl.nuspec";
CreateDirectory(nugetPackDir);
CopyFileToDirectory(Path.Combine(assetDir, nuspecFile), nugetPackDir);
CopyFileToDirectory(fileToPublish, nugetPackDir);
CopyDirectory(directoryToPublish, nugetPackDir);
NuGetPack(Path.Combine(nugetPackDir, nuspecFile), new NuGetPackSettings {
Version = nugetVersion,
Expand All @@ -119,14 +119,14 @@ Task("__Publish")
.WithCriteria(BuildSystem.IsRunningOnTeamCity)
.Does(() =>
{
NuGetPush($"{artifactsDir}/Octopus.Core.Parsers.Hcl.{nugetVersion}.nupkg", new NuGetPushSettings {
NuGetPush($"{artifactsDir}/Octopus.CoreParsers.Hcl.{nugetVersion}.nupkg", new NuGetPushSettings {
Source = "https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json",
ApiKey = EnvironmentVariable("MyGetApiKey")
});
if (gitVersionInfo.PreReleaseLabel == "")
{
NuGetPush($"{artifactsDir}/Octopus.Core.Parsers.Hcl.{nugetVersion}.nupkg", new NuGetPushSettings {
NuGetPush($"{artifactsDir}/Octopus.CoreParsers.Hcl.{nugetVersion}.nupkg", new NuGetPushSettings {
Source = "https://www.nuget.org/api/v2/package",
ApiKey = EnvironmentVariable("NuGetApiKey")
});
Expand All @@ -139,7 +139,7 @@ Task("__CopyToLocalPackages")
.Does(() =>
{
CreateDirectory(localPackagesDir);
CopyFileToDirectory(Path.Combine(artifactsDir, $"Octopus.Core.Parsers.Hcl.{nugetVersion}.nupkg"), localPackagesDir);
CopyFileToDirectory(Path.Combine(artifactsDir, $"Octopus.CoreParsers.Hcl.{nugetVersion}.nupkg"), localPackagesDir);
});

private class AutoRestoreFile : IDisposable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<IsPackable>false</IsPackable>

<RootNamespace />

</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions source/Octopus.Core.Parsers.Hcl.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27604.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octopus.Core.Parsers.Hcl.Tests", "Octopus.Core.Parsers.Hcl.Tests\Octopus.Core.Parsers.Hcl.Tests.csproj", "{C2D0CE75-2222-4B3B-8D02-D5DE8E2E887B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octopus.Core.Parsers.Hcl.Tests", "Octopus.Core.Parsers.Hcl.Tests\Octopus.Core.Parsers.Hcl.Tests.csproj", "{C2D0CE75-2222-4B3B-8D02-D5DE8E2E887B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octopus.Core.Parsers.Hcl", "Octopus.Core.Parsers.Hcl\Octopus.Core.Parsers.Hcl.csproj", "{2C02A830-2CA9-4547-B49A-60B7E8DB6B96}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octopus.Core.Parsers.Hcl", "Octopus.Core.Parsers.Hcl\Octopus.Core.Parsers.Hcl.csproj", "{2C02A830-2CA9-4547-B49A-60B7E8DB6B96}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>netcoreapp2.0;net40</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

Expand Down

0 comments on commit d4f9d69

Please sign in to comment.