Skip to content

Commit d094d65

Browse files
author
Joel Mitchell
committed
Updated to stable Cofoundry package, set up new CI with pre-releases on myGet
1 parent f063f3d commit d094d65

File tree

9 files changed

+53
-43
lines changed

9 files changed

+53
-43
lines changed

GitVersion.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mode: ContinuousDeployment
2+
branches: {}
3+
ignore:
4+
sha: []

appveyor.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
version: '{build}'
22
image: Visual Studio 2015
3-
branches:
4-
only:
5-
- master
6-
- develop
73
environment:
84
NUGET_API_KEY:
95
secure: KBgtBksw79Z4kFehSqUePYoknzeWB8Tq8eAzSFPxDysRJCjJT3iUiCzk7OweTp0K
6+
MYGET_API_KEY:
7+
secure: JNkkCPfd2fNbhiTek4Hg4lP3Gf1IvB9xFf/Gv0pJGbw4+h8inQBaKZ6XlxpgRO44
108
build_script:
119
- cmd: PowerShell -Version 2.0 .\build.ps1 -PushPackages true
1210
test: off

build.cake

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
#tool "nuget:?package=GitVersion.CommandLine"
2+
13
//////////////////////////////////////////////////////////////////////
24
// ARGUMENTS
35
//////////////////////////////////////////////////////////////////////
46

57
var target = Argument("target", "Default");
68
var configuration = Argument("configuration", "Release");
79
var pushPackages = Argument("PushPackages", "false") == "true";
8-
var build = Convert.ToInt32(EnvironmentVariable("APPVEYOR_BUILD_VERSION") ?? "0");
9-
var semVersion = "0.1.0";
10-
var assemblyVersion = semVersion + "." + build;
11-
var nugetVersion = semVersion + "-beta" + build.ToString("D4");
10+
bool isPrerelease = false;
11+
GitVersion versionInfo = null;
1212

1313
//////////////////////////////////////////////////////////////////////
1414
// PREPARATION
@@ -41,21 +41,20 @@ Task("Patch-Assembly-Version")
4141
.IsDependentOn("Clean")
4242
.Does(() =>
4343
{
44-
// GitVersion(new GitVersionSettings{
45-
// UpdateAssemblyInfo = false,
46-
// OutputType = GitVersionOutput.BuildServer
47-
// });
44+
versionInfo = GitVersion(new GitVersionSettings{
45+
UpdateAssemblyInfo = false
46+
});
4847

49-
// versionInfo = GitVersion(new GitVersionSettings{ OutputType = GitVersionOutput.Json });
48+
Information("Building version {0} of Cofoundry.Plugins.ErrorLogging.", versionInfo.InformationalVersion);
5049

51-
Information("Building version {0} of Cofoundry.Plugins.ErrorLogging.", nugetVersion);
50+
isPrerelease = !string.IsNullOrEmpty(versionInfo.PreReleaseNumber);
5251

5352
var file = "./src/SolutionInfo.cs";
5453
CreateAssemblyInfo(file, new AssemblyInfoSettings {
55-
Version = semVersion,
56-
FileVersion = assemblyVersion,
57-
InformationalVersion = nugetVersion,
58-
Copyright = "Copyright © Cofoundry.org 2016"
54+
Version = versionInfo.AssemblySemVer,
55+
FileVersion = versionInfo.MajorMinorPatch + ".0",
56+
InformationalVersion = versionInfo.InformationalVersion,
57+
Copyright = "Copyright © Cofoundry.org " + DateTime.Now.Year
5958
});
6059
});
6160

@@ -69,7 +68,6 @@ Task("Build")
6968
// Use MSBuild
7069
MSBuild("./src/Cofoundry.Plugins.ErrorLogging.sln", settings => settings.SetConfiguration(configuration));
7170
}
72-
// Git Link: http://www.michael-whelan.net/continuous-delivery-github-cake-gittools-appveyor/
7371
});
7472

7573
Task("Pack")
@@ -80,7 +78,7 @@ Task("Pack")
8078

8179
var nuGetPackSettings = new NuGetPackSettings
8280
{
83-
Version = nugetVersion,
81+
Version = versionInfo.NuGetVersion,
8482
OutputDirectory = nugetPackageDir,
8583
Verbosity = NuGetVerbosity.Detailed,
8684
ArgumentCustomization = args => args.Append("-Prop Configuration=" + configuration)
@@ -103,10 +101,20 @@ Task("PushNuGetPackage")
103101
{
104102
Information("Pushing packages");
105103

106-
NuGetPush(nugets, new NuGetPushSettings {
107-
Source = "https://nuget.org/",
108-
ApiKey = EnvironmentVariable("NUGET_API_KEY")
109-
});
104+
if (isPrerelease)
105+
{
106+
NuGetPush(nugets, new NuGetPushSettings {
107+
Source = "https://www.myget.org/F/cofoundry/api/v2/package",
108+
ApiKey = EnvironmentVariable("MYGET_API_KEY")
109+
});
110+
}
111+
else
112+
{
113+
NuGetPush(nugets, new NuGetPushSettings {
114+
Source = "https://nuget.org/",
115+
ApiKey = EnvironmentVariable("NUGET_API_KEY")
116+
});
117+
}
110118
}
111119
});
112120

src/Cofoundry.Plugins.ErrorLogging.Admin/Cofoundry.Plugins.ErrorLogging.Admin.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Cofoundry.Core, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
57-
<HintPath>..\packages\Cofoundry.Core.0.1.0-beta0106\lib\net461\Cofoundry.Core.dll</HintPath>
57+
<HintPath>..\packages\Cofoundry.Core.0.1.0\lib\net461\Cofoundry.Core.dll</HintPath>
5858
<Private>True</Private>
5959
</Reference>
6060
<Reference Include="Cofoundry.Domain, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
61-
<HintPath>..\packages\Cofoundry.Domain.0.1.0-beta0106\lib\net461\Cofoundry.Domain.dll</HintPath>
61+
<HintPath>..\packages\Cofoundry.Domain.0.1.0\lib\net461\Cofoundry.Domain.dll</HintPath>
6262
<Private>True</Private>
6363
</Reference>
6464
<Reference Include="Cofoundry.Web, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
65-
<HintPath>..\packages\Cofoundry.Web.0.1.0-beta0106\lib\net461\Cofoundry.Web.dll</HintPath>
65+
<HintPath>..\packages\Cofoundry.Web.0.1.0\lib\net461\Cofoundry.Web.dll</HintPath>
6666
<Private>True</Private>
6767
</Reference>
6868
<Reference Include="Cofoundry.Web.Admin, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
69-
<HintPath>..\packages\Cofoundry.Web.Admin.0.1.0-beta0106\lib\net461\Cofoundry.Web.Admin.dll</HintPath>
69+
<HintPath>..\packages\Cofoundry.Web.Admin.0.1.0\lib\net461\Cofoundry.Web.Admin.dll</HintPath>
7070
<Private>True</Private>
7171
</Reference>
7272
<Reference Include="Conditions, Version=2.1.0.24, Culture=neutral, processorArchitecture=MSIL">

src/Cofoundry.Plugins.ErrorLogging.Admin/Cofoundry.Plugins.ErrorLogging.Admin.nuspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
<tags>Cofoundry Plugin ErrorLogging Admin</tags>
1616
<dependencies>
1717
<dependency id="Cofoundry.Plugins.ErrorLogging" version="$version$" />
18-
18+
1919
<dependency id="Antlr" version="3.5.0.2" />
2020
<dependency id="AutoMapper" version="5.2.0" />
21-
<dependency id="Cofoundry.Core" version="0.1.0-beta0106" />
22-
<dependency id="Cofoundry.Domain" version="0.1.0-beta0106" />
23-
<dependency id="Cofoundry.Web" version="0.1.0-beta0106" />
24-
<dependency id="Cofoundry.Web.Admin" version="0.1.0-beta0106" />
21+
<dependency id="Cofoundry.Core" version="0.1.0" />
22+
<dependency id="Cofoundry.Domain" version="0.1.0" />
23+
<dependency id="Cofoundry.Web" version="0.1.0" />
24+
<dependency id="Cofoundry.Web.Admin" version="0.1.0" />
2525
<dependency id="CommonServiceLocator" version="1.3" />
2626
<dependency id="Conditions" version="2.1.0" />
2727
<dependency id="EntityFramework" version="6.1.3" />

src/Cofoundry.Plugins.ErrorLogging.Admin/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<packages>
33
<package id="Antlr" version="3.5.0.2" targetFramework="net461" />
44
<package id="AutoMapper" version="5.2.0" targetFramework="net461" />
5-
<package id="Cofoundry.Core" version="0.1.0-beta0106" targetFramework="net461" />
6-
<package id="Cofoundry.Domain" version="0.1.0-beta0106" targetFramework="net461" />
7-
<package id="Cofoundry.Web" version="0.1.0-beta0106" targetFramework="net461" />
8-
<package id="Cofoundry.Web.Admin" version="0.1.0-beta0106" targetFramework="net461" />
5+
<package id="Cofoundry.Core" version="0.1.0" targetFramework="net461" />
6+
<package id="Cofoundry.Domain" version="0.1.0" targetFramework="net461" />
7+
<package id="Cofoundry.Web" version="0.1.0" targetFramework="net461" />
8+
<package id="Cofoundry.Web.Admin" version="0.1.0" targetFramework="net461" />
99
<package id="CommonServiceLocator" version="1.3" targetFramework="net461" />
1010
<package id="Conditions" version="2.1.0" targetFramework="net461" />
1111
<package id="EntityFramework" version="6.1.3" targetFramework="net461" />

src/Cofoundry.Plugins.ErrorLogging/Cofoundry.Plugins.ErrorLogging.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
<Private>True</Private>
4141
</Reference>
4242
<Reference Include="Cofoundry.Core, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Cofoundry.Core.0.1.0-beta0106\lib\net461\Cofoundry.Core.dll</HintPath>
43+
<HintPath>..\packages\Cofoundry.Core.0.1.0\lib\net461\Cofoundry.Core.dll</HintPath>
4444
<Private>True</Private>
4545
</Reference>
4646
<Reference Include="Cofoundry.Domain, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
47-
<HintPath>..\packages\Cofoundry.Domain.0.1.0-beta0106\lib\net461\Cofoundry.Domain.dll</HintPath>
47+
<HintPath>..\packages\Cofoundry.Domain.0.1.0\lib\net461\Cofoundry.Domain.dll</HintPath>
4848
<Private>True</Private>
4949
</Reference>
5050
<Reference Include="Conditions, Version=2.1.0.24, Culture=neutral, processorArchitecture=MSIL">

src/Cofoundry.Plugins.ErrorLogging/Cofoundry.Plugins.ErrorLogging.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<tags>Cofoundry Plugin ErrorLogging</tags>
1616
<dependencies>
1717
<dependency id="AutoMapper" version="5.2.0" />
18-
<dependency id="Cofoundry.Core" version="0.1.0-beta0106" />
19-
<dependency id="Cofoundry.Domain" version="0.1.0-beta0106" />
18+
<dependency id="Cofoundry.Core" version="0.1.0" />
19+
<dependency id="Cofoundry.Domain" version="0.1.0" />
2020
<dependency id="Conditions" version="2.1.0" />
2121
<dependency id="EntityFramework" version="6.1.3" />
2222
<dependency id="HtmlAgilityPack" version="1.4.9.5" />

src/Cofoundry.Plugins.ErrorLogging/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="AutoMapper" version="5.2.0" targetFramework="net461" />
4-
<package id="Cofoundry.Core" version="0.1.0-beta0106" targetFramework="net461" />
5-
<package id="Cofoundry.Domain" version="0.1.0-beta0106" targetFramework="net461" />
4+
<package id="Cofoundry.Core" version="0.1.0" targetFramework="net461" />
5+
<package id="Cofoundry.Domain" version="0.1.0" targetFramework="net461" />
66
<package id="Conditions" version="2.1.0" targetFramework="net461" />
77
<package id="EntityFramework" version="6.1.3" targetFramework="net461" />
88
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net461" />

0 commit comments

Comments
 (0)