Skip to content

Commit 48551be

Browse files
authored
Merge pull request #8 from XerProjects/release-2.0.0
Release 2.0.0
2 parents fc945f0 + f5f71e1 commit 48551be

File tree

4 files changed

+44
-149
lines changed

4 files changed

+44
-149
lines changed

Src/Xer.DomainDriven/Xer.DomainDriven.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard1.0</TargetFramework>
5+
<Authors>jeyjeyemem;xerprojects-contributors;</Authors>
6+
<Description>Domain driven design components and marker interfaces.</Description>
7+
<Copyright>Copyright (c) XerProjects contributors</Copyright>
8+
<PackageLicenseUrl>https://github.com/XerProjects/Xer.DomainDriven/blob/master/LICENSE</PackageLicenseUrl>
9+
<PackageProjectUrl>https://github.com/XerProjects/Xer.DomainDriven</PackageProjectUrl>
10+
<PackageTags>domain-driven-design;ddd;</PackageTags>
511
</PropertyGroup>
612

713
</Project>

Src/Xer.DomainDriven/Xer.DomainDriven.nuspec

Lines changed: 0 additions & 24 deletions
This file was deleted.

appveyor.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: '{build}'
2+
pull_requests:
3+
do_not_increment_build_number: true
4+
image: Visual Studio 2017
5+
nuget:
6+
disable_publish_on_pr: true
7+
build_script:
8+
- ps: .\build.ps1
9+
test: off
10+
artifacts:
11+
- path: .\BuildArtifacts\*.nupkg
12+
name: NuGet
13+
skip_commits:
14+
message: /^\[nobuild\](.*)?/ # Skip build if commit message starts with [nobuild]
15+
deploy:
16+
- provider: NuGet
17+
server: https://www.myget.org/F/xerprojects-ci/api/v2/package
18+
api_key:
19+
secure: u04sQwcw2Dg6ymwifBf1PoYRwo6HrQOsEagB7IQYvwRPt+10tyFcrbuKq7Az34Oz
20+
skip_symbols: true
21+
on:
22+
branch: /(^dev$|^master$|^release[-/](.*)|^hotfix[-/](.*))/ # Branches: dev, master, release-*, release/*, hotfix-*, hotfix/*
23+
- provider: NuGet
24+
name: production
25+
skip_symbols: true
26+
api_key:
27+
secure: 1fEVy/0Jgny/LKUOQC75fofhRjEfpAaVV0Y8u3nH+oKdmrPFFFEF1swA+iS0W0rV
28+
on:
29+
branch: master
30+
appveyor_repo_tag: true # Only deploy to NuGet if a tag is found.

build.cake

Lines changed: 8 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,19 @@ Setup(context =>
2929

3030
// Executed BEFORE the first task.
3131
Information("Xer.DomainDriven");
32-
Information("Parameters");
33-
Information("///////////////////////////////////////////////////////////////////////////////");
34-
Information("Branch: {0}", buildParameters.BranchName);
35-
Information("Version semver: {0}", buildParameters.GitVersion.LegacySemVerPadded);
36-
Information("Version assembly: {0}", buildParameters.GitVersion.AssemblySemVer);
37-
Information("Version informational: {0}", buildParameters.GitVersion.InformationalVersion);
38-
Information("Master branch: {0}", buildParameters.IsMasterBranch);
39-
Information("Release branch: {0}", buildParameters.IsReleaseBranch);
40-
Information("Dev branch: {0}", buildParameters.IsDevBranch);
41-
Information("Hotfix branch: {0}", buildParameters.IsHotFixBranch);
42-
Information("Pull request: {0}", buildParameters.IsPullRequest);
43-
Information("Publish to myget: {0}", buildParameters.ShouldPublishMyGet);
44-
Information("Publish to nuget: {0}", buildParameters.ShouldPublishNuGet);
45-
Information("Execute git tag: {0}", buildParameters.ShouldExecuteGitTag);
46-
Information("///////////////////////////////////////////////////////////////////////////////");
47-
32+
Information("===========================================================================================");
33+
Information("Git Version");
34+
Information("Semver: {0}", buildParameters.GitVersion.LegacySemVerPadded);
35+
Information("Major minor patch: {0}", buildParameters.GitVersion.MajorMinorPatch);
36+
Information("Assembly: {0}", buildParameters.GitVersion.AssemblySemVer);
37+
Information("Informational: {0}", buildParameters.GitVersion.InformationalVersion);
4838
if (DirectoryExists(buildParameters.BuildArtifactsDirectory))
4939
{
5040
// Cleanup build artifacts.
5141
Information($"Cleaning up {buildParameters.BuildArtifactsDirectory} directory.");
5242
DeleteDirectory(buildParameters.BuildArtifactsDirectory, new DeleteDirectorySettings { Recursive = true });
5343
}
44+
Information("===========================================================================================");
5445
});
5546

5647
Teardown(context =>
@@ -158,6 +149,7 @@ Task("Test")
158149
});
159150

160151
Task("Pack")
152+
.Description("Create NuGet packages.")
161153
.IsDependentOn("Test")
162154
.Does(() =>
163155
{
@@ -183,74 +175,12 @@ Task("Pack")
183175
}
184176
});
185177

186-
Task("PublishMyGet")
187-
.WithCriteria(() => buildParameters.ShouldPublishMyGet)
188-
.IsDependentOn("Pack")
189-
.Does(() =>
190-
{
191-
// Nupkgs in BuildArtifacts folder.
192-
var nupkgs = GetFiles(buildParameters.BuildArtifactsDirectory + "/*.nupkg");
193-
194-
if (nupkgs.Count() == 0)
195-
{
196-
Information("No nupkgs found.");
197-
return;
198-
}
199-
200-
foreach (var nupkgFile in nupkgs)
201-
{
202-
Information("Pulishing to myget {0}", nupkgFile);
203-
NuGetPush(nupkgFile, new NuGetPushSettings
204-
{
205-
Source = buildParameters.MyGetFeed,
206-
ApiKey = buildParameters.MyGetApiKey
207-
});
208-
}
209-
});
210-
211-
Task("PublishNuGet")
212-
.WithCriteria(() => buildParameters.ShouldPublishNuGet && !string.IsNullOrWhiteSpace("APPVEYOR_REPO_TAG_NAME"))
213-
.IsDependentOn("Pack")
214-
.Does(() =>
215-
{
216-
// Nupkgs in BuildArtifacts folder.
217-
var nupkgs = GetFiles(buildParameters.BuildArtifactsDirectory + "/*.nupkg");
218-
219-
if (nupkgs.Count() == 0)
220-
{
221-
Information("No nupkgs found.");
222-
return;
223-
}
224-
225-
foreach (var nupkgFile in nupkgs)
226-
{
227-
Information("Pulishing to nuget {0}", nupkgFile);
228-
NuGetPush(nupkgFile, new NuGetPushSettings
229-
{
230-
Source = buildParameters.NuGetFeed,
231-
ApiKey = buildParameters.NuGetApiKey
232-
});
233-
}
234-
});
235-
236-
Task("GitTag")
237-
.WithCriteria(() => buildParameters.ShouldExecuteGitTag)
238-
.IsDependentOn("PublishNuGet")
239-
.Does(() =>
240-
{
241-
Information($"Creating git tag: {buildParameters.GitTagName}");
242-
GitTag("./", buildParameters.GitTagName);
243-
});
244-
245178
///////////////////////////////////////////////////////////////////////////////
246179
// TARGETS
247180
///////////////////////////////////////////////////////////////////////////////
248181

249182
Task("Default")
250183
.Description("This is the default task which will be ran if no specific target is passed in.")
251-
.IsDependentOn("GitTag")
252-
.IsDependentOn("PublishNuGet")
253-
.IsDependentOn("PublishMyGet")
254184
.IsDependentOn("Pack")
255185
.IsDependentOn("Test")
256186
.IsDependentOn("Build")
@@ -276,53 +206,6 @@ public class BuildParameters
276206

277207
public GitVersion GitVersion => _gitVersion;
278208

279-
public bool IsAppVeyorBuild => _context.BuildSystem().AppVeyor.IsRunningOnAppVeyor;
280-
281-
public bool IsLocalBuild => _context.BuildSystem().IsLocalBuild;
282-
283-
public bool IsPullRequest => _context.BuildSystem().AppVeyor.Environment.PullRequest.IsPullRequest;
284-
285-
public string BranchName
286-
{
287-
get
288-
{
289-
return IsLocalBuild
290-
? _context.GitBranchCurrent(".").FriendlyName
291-
: _context.BuildSystem().AppVeyor.Environment.Repository.Branch;
292-
}
293-
}
294-
295-
public string GitHubUsername => _context.EnvironmentVariable("GITHUB_USERNAME");
296-
297-
public string GitHubPassword => _context.EnvironmentVariable("GITHUB_PASSWORD");
298-
299-
public string MyGetFeed => _context.EnvironmentVariable("MYGET_SOURCE");
300-
301-
public string MyGetApiKey => _context.EnvironmentVariable("MYGET_API_KEY");
302-
303-
public string NuGetFeed => _context.EnvironmentVariable("NUGET_SOURCE");
304-
305-
public string NuGetApiKey => _context.EnvironmentVariable("NUGET_API_KEY");
306-
307-
public bool IsMasterBranch => StringComparer.OrdinalIgnoreCase.Equals("master", BranchName);
308-
309-
public bool IsDevBranch => StringComparer.OrdinalIgnoreCase.Equals("dev", BranchName);
310-
311-
public bool IsReleaseBranch => BranchName.StartsWith("release", StringComparison.OrdinalIgnoreCase);
312-
313-
public bool IsHotFixBranch => BranchName.StartsWith("hotfix", StringComparison.OrdinalIgnoreCase);
314-
315-
public bool ShouldPublishMyGet => !string.IsNullOrWhiteSpace(MyGetApiKey) && !string.IsNullOrWhiteSpace(MyGetFeed);
316-
317-
public bool ShouldPublishNuGet => !string.IsNullOrWhiteSpace(NuGetApiKey)
318-
&& !string.IsNullOrWhiteSpace(NuGetFeed)
319-
&& (IsMasterBranch || IsHotFixBranch || IsReleaseBranch)
320-
&& !IsPullRequest;
321-
322-
public bool ShouldExecuteGitTag => ShouldPublishNuGet;
323-
324-
public string GitTagName => $"v{GitVersion.SemVer}";
325-
326209
public string BuildArtifactsDirectory => "./BuildArtifacts";
327210

328211
public ProcessArgumentBuilder AppendVersionArguments(ProcessArgumentBuilder args) => args

0 commit comments

Comments
 (0)