Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
724 commits
Select commit Hold shift + click to select a range
a88499c
Add build commands to contributing.md
seif Jan 20, 2013
747fe9d
Minor contributions.md changes
seif Jan 20, 2013
d69971f
update Raven nuspec to use raven 2.0 - 3.0
seif Jan 21, 2013
37ba4aa
Remove Iesi.Collections from web project
seif Jan 21, 2013
8d1c240
Merge branch 'hotfix/RC3'
seif Jan 21, 2013
97f3696
Merge branch 'hotfix/RC3' into develop
seif Jan 21, 2013
1522bad
Change submodule to use https url
seif Jan 21, 2013
c4e6edc
Documentation update
seif Jan 28, 2013
4f030fd
Renamed Raven UnitOfWork to Transaction
seif Jan 28, 2013
cd74c84
Removed support for multiple command handlers for a single command (s…
sandord Feb 13, 2013
6dcc4e8
Fixed an incorrect code comment.
sandord Feb 13, 2013
e206ddf
Corrected code documentation.
sandord May 9, 2013
3023c66
Updated the Newtonsoft.Json dependency to version 5.0.5.
sandord May 9, 2013
3cf42c2
Updated the NHibernate dependency to version 3.3.3.
sandord May 9, 2013
43ea039
Corrected code documentation.
sandord May 9, 2013
6ac83a8
Fixed the NuGet build files to include the SharpArch.Web.Http project.
sandord May 9, 2013
121fd63
Enabled XML documentation generation for all deployed projects.
sandord May 9, 2013
6aa7550
Removed the now obsolete CanHandleMultipleCommands test since only on…
sandord Aug 9, 2013
97a9d5b
Added a new test ThrowsIfMultipleCommandHandlersRegisteredForSingleCo…
sandord Aug 9, 2013
b0b1c8b
Fixed for a failing test in SharpModelBinderTests that was failing be…
sandord Aug 9, 2013
133db2b
Fix for Nuget 2.1 packages
alecwhittington Oct 9, 2012
ac2d355
Limit Iesi.Collections to versions < 4
seif Jan 3, 2014
ce935ac
Update dependencies
seif Jan 4, 2014
b7323f1
BuildSystem update
seif Jan 4, 2014
69c527c
Remove RC tag, now at 2.1
seif Jan 4, 2014
6b0e555
updated documentation
seif Jan 4, 2014
d1d1b9c
Change nuspec dependency versions
seif Jan 7, 2014
179ef00
Add update instructions
seif Jan 7, 2014
d038db8
Merge branch 'hotfix/2.1.0'
seif Jan 7, 2014
79a4986
Merge branch 'hotfix/2.1.0' into develop
seif Jan 7, 2014
f213f0d
update nuget executable
seif Jan 7, 2014
afb48c5
Reintroduced nuget package icons
seif Jan 7, 2014
5d68a2c
Up to version 2.1.1
seif Jan 7, 2014
f750eed
Submodule update
seif Jan 7, 2014
74f04fc
Merge branch 'hotfix/2.1.1'
seif Jan 7, 2014
0abdff1
Merge branch 'hotfix/2.1.1' into develop
seif Jan 7, 2014
1435adb
Fix SharpArch.Domain version in nuspec
seif Jan 8, 2014
4ed536b
Merge branch 'hotfix/2.1.2'
seif Jan 8, 2014
86ed372
Merge branch 'hotfix/2.1.2' into develop
seif Jan 8, 2014
676585c
Submodule update
seif Jan 10, 2014
34affaa
Merge branch 'v3' of github.com:sharparchitecture/Sharp-Architecture …
seif Jan 10, 2014
6e43042
Revert "Revert "Removed Castle dependencies from some projects""
seif Jan 14, 2014
97fb2f9
Revert "Revert "Merge pull request #75 from Type1/v3""
seif Jan 14, 2014
9a179fa
Merge remote-tracking branch 'seif/v3' into develop
seif Jan 14, 2014
7d82cfe
Fix WebApi reference in Http.Castle project
seif Jan 14, 2014
ca407f6
Unify dependency version after merge
seif Jan 14, 2014
02d46f1
Update CONTRIBUTING.md
scpeterson Feb 7, 2014
480cf6f
Merge pull request #97 from scpeterson/master
seif Feb 9, 2014
56e7a01
Fixes #101
kabudahab Aug 15, 2014
723fe62
Use nuget for MVC 4 references
kabudahab Aug 15, 2014
a0d06f4
Added CommonServiceLocator.WindsorAdapter to dependency packages
kabudahab Aug 16, 2014
cb16ee0
Merge branch 'kad0xf-#101' into 2.2RC
seif Aug 17, 2014
6e50c10
Merge branch 'kad0xf-Use-nuget-for-MVC-4-references' into 2.2RC
seif Aug 17, 2014
d87a839
Version 2.2 RC
seif Aug 17, 2014
1173cfb
Migrate to .NET 4.5 and ASP.NET MVC 5.2
cd21h Feb 5, 2015
1716478
Bump version to 3.0
cd21h Feb 9, 2015
7fad988
Merge remote-tracking branch 'alphacloud/net-45'
Feb 10, 2015
0fac54e
Use upstream BuildSystem
Feb 10, 2015
883f45c
Set version to 3.0.0RC
Feb 10, 2015
bbaacf3
Remove RC, now at 3.0.0
Feb 11, 2015
7ec5bae
[BREAKING] GetHashCode() and Equals() performance optimization.
cd21h Feb 16, 2015
ba570a0
Merge remote-tracking branch 'origin/develop' into feature/V3Merge
cd21h Feb 16, 2015
5cd8cb0
Update Build project and fix compilation issues
cd21h Feb 16, 2015
aa8ddfe
Update dependencies
cd21h Feb 16, 2015
b878fb6
Cleanup references
cd21h Feb 16, 2015
12ea2d6
Fix formatting
cd21h Mar 1, 2015
1044613
Cleanup NuGet dependencies, update version in nuspecs, see #113
cd21h Mar 5, 2015
41b4509
Add commands to generate missing packages, see #113
cd21h Mar 5, 2015
7034643
Update SQLite to 1.0.96
cd21h Mar 5, 2015
3046008
Merge branch 'feature/V3Merge' into develop
cd21h Mar 6, 2015
9e93704
Fix sharp-architecture nuspec dependency versions
seif Mar 11, 2015
45fd931
Up version to 3.0.1
seif Mar 11, 2015
5c60252
Merge pull request #114 from alphacloud/develop
seif Mar 11, 2015
62cf175
Unify nuget.tagets csproj imports
seif Mar 12, 2015
3c7df9e
Fixes to allow building on mono
seif Mar 12, 2015
26796d5
Merge remote-tracking branch 'upstream/master' into develop
cd21h Apr 27, 2015
670ae57
Import Suteki.TardisBank, see #117
cd21h May 10, 2015
e982b69
Code style fixes, see #117
cd21h May 15, 2015
efe32b5
Merge pull request #121 from alphacloud/feature/TardisBankImport
seif May 30, 2015
ffa98b5
Update NHibernate setup, see #61
cd21h Jul 24, 2015
7fc42db
Cleanup Samples
cd21h Jul 29, 2015
d2f65bc
Merge pull request #123 from alphacloud/feature/SA61
seif Jul 29, 2015
f33dbaf
Merge branch 'develop' of https://github.com/alphacloud/Sharp-Archite…
cd21h Jul 29, 2015
1520ff8
Merge remote-tracking branch 'upstream/develop' into develop
cd21h Jul 29, 2015
1bf558d
Merge remote-tracking branch 'upstream/develop' into develop
cd21h Nov 24, 2015
16914fa
Merge branch 'develop' of https://github.com/alphacloud/Sharp-Archite…
cd21h Nov 24, 2015
e93dd98
Remove Command/Query code, see #124
cd21h Nov 25, 2015
2c47916
Merge pull request #125 from alphacloud/feature/SA124
seif Nov 26, 2015
3a684cf
Add unit-tests to insure event listeners registered with XML configur…
cd21h Nov 27, 2015
bc2c8df
Merge pull request #126 from alphacloud/feature/SA54InterceptorRegist…
seif Nov 27, 2015
f66e35d
Fix #85 expose NHibernate configuration before building session factory.
cd21h Nov 27, 2015
48b6744
Make Make the NHibernateRepositoryWithTypedId<T, TID>.Delete(TId id) …
cd21h Nov 28, 2015
cd35848
Cleanup LinqRepositoryWithTypedId, fixes #88
cd21h Nov 28, 2015
c43ded5
Merge pull request #127 from alphacloud/feature/DalFixes
seif Dec 4, 2015
cd94a6c
Point to latest BuildSystem
cd21h Dec 6, 2015
4135a07
Merge pull request #128 from alphacloud/develop
cd21h Dec 6, 2015
e7b5fad
Upgrade NuGet dependencies, fixes #129
cd21h Dec 17, 2015
4621d42
Merge pull request #130 from alphacloud/feature/v3dependenciesUpgrade
seif Dec 30, 2015
7bd0720
Property injection for WebAPI filters, closes #120
cd21h Dec 30, 2015
b23079e
Up to version 3.1.1
seif Dec 31, 2015
68da821
Merge remote-tracking branch 'origin/feature/SA120WebApiPropertyInjec…
cd21h Jan 2, 2016
49bbd22
Merge pull request #131 from alphacloud/feature/SA120WebApiPropertyIn…
seif Jan 6, 2016
5957855
Merge remote-tracking branch 'upstream/develop' into develop
cd21h Jan 6, 2016
d696c36
Update BuildSystem
cd21h Jan 6, 2016
ed0a8c9
Merge remote-tracking branch 'upstream/develop' into develop
cd21h Jan 6, 2016
2294269
Upgrade third-party dependencies
cd21h Jan 6, 2016
8ebfa6d
Merge pull request #132 from alphacloud/feature/V4DependenciesUpgrade01
seif Jan 7, 2016
8863c69
Add appveyor.yml
seif Jan 7, 2016
af1d35a
Add build status to README
seif Jan 7, 2016
e128f82
Configure appveyor nuget publishing
seif Jan 7, 2016
4874ee6
Merge pull request #134 from sharparchitecture/add-appveyor-config
cd21h Jan 7, 2016
0f98d89
Scoped dependencies for Web API, fixes #52
cd21h Jan 9, 2016
64278e6
Performance tuning
cd21h Jan 9, 2016
21d3cf6
Merge pull request #135 from sharparchitecture/feature/sa52-scoped-de…
cd21h Jan 12, 2016
eb23be6
Custom transaction isolation level support and TransactionManager upd…
cd21h Jan 17, 2016
9a9cce3
Merge branch 'develop' into feature/sa79
cd21h Jan 18, 2016
f508ba8
Merge pull request #136 from sharparchitecture/feature/sa79
seif Jan 18, 2016
16af15a
WindsorPropertyInjectionExtensions - performance improvements, closes…
cd21h Jan 22, 2016
d5c7836
Merge pull request #138 from sharparchitecture/feature/sa137
cd21h Jan 23, 2016
1830cce
Replace defunct sharparchitecture.net links
seif Jan 23, 2016
1e4a9a3
Merge branch 'fix-links'
seif Jan 23, 2016
5af08c3
Replace defunct sharparchitecture.net links
seif Jan 23, 2016
c1b1404
Add build status title
cd21h Feb 7, 2016
c31b07a
Migrate to ReSharper annotations, closes #73
cd21h Mar 6, 2016
c3c67fe
Restore NuGet packages before build
cd21h Apr 9, 2016
ca98118
Upgrade third-party dependencies
cd21h Apr 9, 2016
c3273e3
Allow Json.Net 8, fixes #149
cd21h Apr 9, 2016
ea61119
Enable nuget package deployment
cd21h Apr 9, 2016
71aa5ef
Update installation documentation
cd21h Apr 9, 2016
a88d203
Fix spaces
cd21h Apr 14, 2016
94df913
Update dependencies
cd21h Apr 15, 2016
0359437
Nuget: Update S#Arch versions automatically
cd21h Apr 15, 2016
ad7d52e
Update documentation
cd21h Apr 17, 2016
6b38cb6
Fix syntax highlighting
cd21h Apr 18, 2016
b8159e1
Minor documentation updates
cd21h Jul 12, 2016
6e4d473
Upgrade dependencies
cd21h Jul 23, 2016
45dd6d2
Remove obsolete classes, closes #145
cd21h Jul 24, 2016
03a0add
Cleanup
cd21h Sep 15, 2016
bc92e37
Hotfix/upgrade dependencies (#152)
cd21h Sep 18, 2016
9bbe83c
Upgrade dependencies
cd21h Nov 1, 2016
66354b8
Upgrade dependencies
cd21h Nov 1, 2016
2b04b00
Add GitVersion
cd21h Nov 1, 2016
9069aec
Migrating to GitVersion
cd21h Nov 5, 2016
f8ef40f
Ensure AssemblyInfo exists, see #153
cd21h Nov 5, 2016
2228ffb
Ensure AssemblyInfo exists, see #153
cd21h Nov 5, 2016
aeb9c62
Add GitVersion configuration, see #153
cd21h Nov 5, 2016
a7c014d
Deploy from pre-release branches, see #153
cd21h Nov 5, 2016
5896cd6
Update sample
cd21h Nov 7, 2016
b04f47d
Update build system
cd21h Nov 7, 2016
2d65c0a
Update documentation
cd21h Nov 7, 2016
ce870d5
Update build docs
cd21h Nov 27, 2016
2620894
Upgrade third-party dependencies
cd21h Dec 3, 2016
ef00326
Build Samples as part of S#arp Architecture build.
cd21h Dec 4, 2016
ea6e858
Merge branch 'releases/4.0.0'
cd21h Dec 7, 2016
7583ff0
Fix GitVersion mode
cd21h Dec 7, 2016
6f48d11
Fix GitVersion mode
cd21h Dec 7, 2016
3f3a728
Merge branch 'releases/4.0.0'
cd21h Dec 7, 2016
bf041c9
Enable Json.Net v10, closes #158
cd21h Aug 20, 2017
ec1bea0
Merge pull request #159 from sharparchitecture/releases/4.0.1
cd21h Aug 29, 2017
d09abc5
Allow Json.Net v11, closes #164
cd21h Apr 14, 2018
3597f21
Merge pull request #165 from sharparchitecture/releases/4.0.2
cd21h Apr 15, 2018
d6363f8
Release 5.0.0
cd21h Sep 20, 2019
a89b848
5.0.1
cd21h Sep 22, 2019
923422c
5.0.1
cd21h Sep 22, 2019
76110ef
Fix typos
cd21h Sep 22, 2019
ffa9b67
Minor fixes
cd21h Sep 22, 2019
b436e41
UnitOfWork: Check if transaction is active before committing or rolli…
cd21h Jan 23, 2020
1001550
troubleshoot build script
cd21h Jan 24, 2020
9e7016f
Merge branch 'releases/5.0.2'
cd21h Jan 24, 2020
4fe44c5
Refactor build script
cd21h Sep 23, 2019
7da7eda
Type hilo-generator (#200)
rgomez90 Oct 2, 2019
e3caa76
NHibernate configuration improvements (#208)
cd21h Nov 24, 2019
41b1e9f
BREAKING: Remove synchronous methods from repositories (#209)
cd21h Dec 13, 2019
3e30bec
Update readthedocs config and generate markdown (#210)
seif Jan 8, 2020
e65d318
BREAKING: IEntity interface
cd21h Apr 5, 2020
708e140
Add .NET Core 3.1 support (#216)
cd21h Apr 8, 2020
b885165
Check for active transaction before commit/rollback, closes #212
cd21h Apr 11, 2020
ba31a8f
Add NHibernate extensions, closes #204
cd21h Apr 14, 2020
7e7aa1e
Expose NHibernate cache configuration, closes #207
cd21h Apr 15, 2020
0a2398e
Add SharpArch.NHibernate.Extensions.DependencyInjection (#219)
cd21h Jun 10, 2020
df42b4d
Release 6.0
cd21h Jun 12, 2020
59b0a05
Add label for documentation
cd21h Jun 12, 2020
fc33ec6
Update package icon
cd21h Jun 12, 2020
ee48cdd
Merge pull request #221 from sharparchitecture/release/6.0.0
cd21h Jun 14, 2020
852e7bc
Check for active transaction before commit/rollback, closes #212
cd21h Apr 11, 2020
4496c7f
Add SharpArch.NHibernate.Extensions.DependencyInjection (#219)
cd21h Jun 10, 2020
5f1847d
Add .NET 5 support (#224)
cd21h Dec 7, 2020
4c6dbc0
Update NuGet API key
cd21h Dec 7, 2020
0bca1a5
Switch to Github token, closes #225
cd21h Dec 7, 2020
08bc347
Feature/net5 (#230)
cd21h Dec 27, 2020
9e1d954
.NET 5, closes #222
cd21h Dec 27, 2020
687f85c
Publish debug symbols in a separate NuGet package, closes #229
cd21h Dec 27, 2020
72fce67
Update dependencies and version history
cd21h Dec 28, 2020
cbc986c
Remove Newtonsoft.Json from TransactionAttribute sample
cd21h Dec 28, 2020
e4afe5d
Update generated DB schema
cd21h Dec 28, 2020
c40f895
Update token
cd21h Dec 28, 2020
c9f1c6e
Merge branch 'releases/6.1.0'
cd21h Dec 29, 2020
8641525
Fix InvalidUriException, closes #245
cd21h Apr 30, 2021
bcbcd12
Release 6.1.1
cd21h Apr 30, 2021
9a8cd33
Merge pull request #246 from sharparchitecture/releases/6.1.1
cd21h Apr 30, 2021
f5cf9d9
Simplify Entity and Repository structure (#233)
cd21h Jan 10, 2021
2e9295e
Remove .NET Core 2.2 as it reached end of life, closes #227 (#234)
cd21h Jan 10, 2021
8b0284f
Remove NHibernate configuration cache, closes #228 (#235)
cd21h Jan 11, 2021
2839329
Remove NHibernate configuration cache, closes #228
cd21h Jan 18, 2021
2eeae0f
Add async support for xUnit fixture, closes #226
cd21h Jan 19, 2021
e91347c
Upgrade dependencies
cd21h Jan 19, 2021
448c52e
Switch to MS.Extensions.Logging, closes #237
cd21h Jan 29, 2021
f835eb0
Upgrade build dependencies, closes #240
cd21h Jan 29, 2021
a039299
Upgrade Cake to v1.0, closes #241
cd21h Mar 29, 2021
48fbcef
Enable nullable reference types, closes #239
cd21h Apr 11, 2021
b18d8d2
Remove redundant annotations, fixes #239
cd21h Apr 12, 2021
b1c6491
Session configuration hooks for in database tests, closes #244
cd21h Apr 12, 2021
90b35b4
Update VersionHistory
cd21h May 31, 2021
87ffca5
Merge pull request #247 from sharparchitecture/releases/7.0.0
cd21h May 31, 2021
c3718f0
Update issue labels
cd21h Oct 27, 2021
0cd24c7
Add .NET 6 preview 7 support
cd21h Sep 7, 2021
9ddf094
WIP: .NET 6, see #243
cd21h Apr 12, 2021
8c1f64e
Install .NET 6 before calling dotnet.exe
cd21h Apr 19, 2021
7f5eebc
WIP: .NET 6 preview
cd21h Aug 2, 2021
37d9aa2
WIP: update to Preview 5
cd21h Jul 1, 2021
dbe7996
Upgrade to .NET 6 Preview 7
cd21h Sep 7, 2021
e666ae6
Update SDK
cd21h Sep 7, 2021
dfad9ba
Upgrade cake
cd21h Sep 7, 2021
39f8278
Upgrade to .NET 6 RC 1
cd21h Oct 9, 2021
3556d8d
Update .NET SDK and build tools
cd21h Oct 9, 2021
85fdedd
Fix ReSharper warnings
cd21h Oct 11, 2021
1b21953
Add LockMode conversion helper
cd21h Oct 11, 2021
6ae6991
Replace ImmutableDictionary with Dictionary to improve performance
cd21h Oct 11, 2021
b5f7d4e
Fix tests
cd21h Oct 11, 2021
42deca5
Run unit-tests on Linux during the build, closes #255
cd21h Oct 12, 2021
a58cfe2
Linux builds and assembly attributes cleanup (#258)
cd21h Oct 25, 2021
e41d7dd
BREAKING: Require Persistence model generator as constructor paramete…
cd21h Oct 26, 2021
5f86fc4
BREAKING: Upgrade target frameworks (#260)
cd21h Oct 26, 2021
54f8d06
Upgrade dependencies (#262)
cd21h Oct 27, 2021
8bf6512
Release 8.0.0
cd21h Oct 27, 2021
fd1ad3a
Cleanup
cd21h Oct 27, 2021
b52db2b
Merge pull request #263 from sharparchitecture/releases/8.0.0
cd21h Oct 27, 2021
9790a9c
.NET 6 release (#265)
cd21h Nov 21, 2021
6474465
Add .NET 7 preview 4 support (#269)
cd21h May 19, 2022
e6a8469
Update NuGet API Key
cd21h May 20, 2022
7574bd7
Upgrade to C# 10, closes #270
cd21h Jun 10, 2022
a7f6f08
.NET 7 Preview 5, closes #273
cd21h Jul 4, 2022
e70c455
Drop SharpArch.RavenDb, closes #282 (#283)
cd21h Jun 21, 2025
32eb623
Update build system, closes #284 (#285)
cd21h Jun 21, 2025
a91d5a5
Drop SharpArch.RavenDb, closes #282 (#288)
cd21h Jun 22, 2025
0bedd89
.NET upgrade (#289)
cd21h Jun 22, 2025
cc11ac3
Replace FluentAssertions with Shouldy, closes #279 (#290)
cd21h Jun 22, 2025
41d88e0
Fix nuget packages publish location
cd21h Jun 23, 2025
91e842d
Upgrade dependencies, closes #277
cd21h Aug 1, 2025
199a169
Upgrade dependencies, #277
cd21h Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Build scripts
185 changes: 185 additions & 0 deletions .build/definitions.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
// ADDINS
#addin nuget:?package=Cake.Coveralls&version=4.0.0
#addin nuget:?package=Cake.FileHelpers&version=7.0.0
#addin nuget:?package=Cake.AppVeyor&version=6.0.0

// TOOLS
#tool nuget:?package=GitReleaseManager&version=0.20.0
#tool nuget:?package=GitVersion.CommandLine&version=5.12.0
#tool nuget:?package=OpenCover&version=4.7.1221
#tool nuget:?package=ReportGenerator&version=5.4.8


public class CodeCoverageSettings
{
public string ExcludeByFile { get; set; } = "*/*Designer.cs";
public string ExcludeByAttribute { get; set; } = "*.ExcludeFromCodeCoverage*";
public string ExcludeFilter { get; set; } = "-[Tests*]*;-[*]Microsoft.CodeAnalysis*;-[*]System.Runtime.CompilerServices.*";
public string IncludeFilter { get; set; }
}

// params
public class ProjectSettings {
public string RepoOwner { get; set; }
public string RepoName { get; set; }
public string SolutionName { get; set; }

public CodeCoverageSettings CodeCoverage { get; }

public ProjectSettings(string repoOwner, string repoName, string solutionName)
{
if (string.IsNullOrEmpty(repoOwner))
throw new ArgumentNullException(nameof(repoOwner), "Value cannot be null or empty.");
if (string.IsNullOrEmpty(repoName))
throw new ArgumentNullException(nameof(repoName), "Value cannot be null or empty.");
if (string.IsNullOrEmpty(solutionName))
throw new ArgumentNullException(nameof(solutionName), "Value cannot be null or empty.");

RepoOwner = repoOwner;
RepoName = repoName;
SolutionName = solutionName;

CodeCoverage = new CodeCoverageSettings {
IncludeFilter = $"+[solutionName*]*"
};
}
}

public class Credentials {
public string UserName { get; }
public string Password { get; }

public Credentials(string userName, string password) {
UserName = userName;
Password = password;
}
}

public class BuildVersion {
public string NuGet { get; }
public string Full { get; }
public string Informational { get; }
public string NextMajor { get; }
public string CommitHash { get; }
public string Milestone { get; }

public BuildVersion(string nuget, string full, string informational, string nextMajor, string commitHash, string milestone) {
NuGet = nuget;
Full = full;
Informational = informational;
NextMajor = nextMajor;
CommitHash = commitHash;
Milestone = milestone;
}
}

public class RepositoryInfo {
public bool IsPullRequest { get; protected set; }
public bool IsMain { get; protected set; }
public bool IsDevelopBranch { get; protected set; }
// Release or hotfix branch
public bool IsReleaseBranch { get; protected set; }
public bool IsTagged { get; protected set; }

public static RepositoryInfo Get(BuildSystem buildSystem, ProjectSettings settings) {
return new RepositoryInfo {
IsPullRequest = buildSystem.AppVeyor.Environment.PullRequest.IsPullRequest,
IsDevelopBranch = StringComparer.OrdinalIgnoreCase.Equals("develop", buildSystem.AppVeyor.Environment.Repository.Branch),
IsReleaseBranch = buildSystem.AppVeyor.Environment.Repository.Branch.IndexOf("release/", StringComparison.OrdinalIgnoreCase) >= 0
|| buildSystem.AppVeyor.Environment.Repository.Branch.IndexOf("releases/", StringComparison.OrdinalIgnoreCase) >= 0
|| buildSystem.AppVeyor.Environment.Repository.Branch.IndexOf("hotfix/", StringComparison.OrdinalIgnoreCase) >= 0
|| buildSystem.AppVeyor.Environment.Repository.Branch.IndexOf("hotfixes/", StringComparison.OrdinalIgnoreCase) >= 0
,
IsTagged = buildSystem.AppVeyor.Environment.Repository.Tag.IsTag,
IsMain = StringComparer.OrdinalIgnoreCase.Equals($"{settings.RepoOwner}/{settings.RepoName}", buildSystem.AppVeyor.Environment.Repository.Name),
};
}
}

// default paths and files
public class Paths {
public DirectoryPath RootDir { get; }
public string SrcDir { get; set; }
public string ArtifactsDir { get; set; }
public string TestCoverageOutputFile { get; set; }
public string TestCoverageReportDir { get; set; }
public string PackagesDir { get; set; }
public string BuildPropsFile { get; set; }
public string TestsRootDir { get; set; }
public string SamplesRootDir { get; set; }
public string CommonAssemblyVersionFile { get; set; }

public Paths(ICakeContext context)
{
RootDir = context.MakeAbsolute(context.Directory("./"));
SrcDir = RootDir.Combine("src").ToString();
ArtifactsDir = RootDir.Combine("artifacts").ToString();
TestCoverageOutputFile = ArtifactsDir + "/OpenCover.xml";
TestCoverageReportDir = ArtifactsDir + "/CodeCoverageReport";
PackagesDir = ArtifactsDir + "/packages";
BuildPropsFile = SrcDir + "/Directory.Build.props";
TestsRootDir = SrcDir + "/tests";
CommonAssemblyVersionFile = SrcDir + "/common/AssemblyVersion.cs";
}

}


public class BuildInfo {
public string Target { get; protected set; }
public string Config { get; protected set; }

public bool IsDebug { get; protected set; }
public bool IsRelease {get; protected set;}

public bool IsLocal { get; protected set; }
public string AppVeyorJobId { get; protected set; }

public BuildVersion Version { get; protected set; }

public RepositoryInfo Repository { get; protected set; }

public string GitHubToken { get; protected set; }

public Paths Paths { get; protected set; }

public ProjectSettings Settings { get; protected set; }

public static BuildInfo Get(ICakeContext context, ProjectSettings settings)
{
if (context == null)
throw new ArgumentNullException(nameof(context));
var target = context.Argument("target", "Default");
var config = context.Argument("buildConfig", "Release");
var buildSystem = context.BuildSystem();

// Calculate version and commit hash
GitVersion semVersion = context.GitVersion();
var version = new BuildVersion(
semVersion.NuGetVersion,
semVersion.FullBuildMetaData,
semVersion.InformationalVersion,
$"{semVersion.Major+1}.0.0",
semVersion.Sha,
semVersion.MajorMinorPatch
);

var gitHubToken = context.EnvironmentVariable("GITHUB_TOKEN");

return new BuildInfo {
Target = target,
Config = config,
IsDebug = string.Equals(config, "Debug", StringComparison.OrdinalIgnoreCase),
IsRelease = string.Equals(config, "Release", StringComparison.OrdinalIgnoreCase),
IsLocal = buildSystem.IsLocalBuild,
AppVeyorJobId = buildSystem.AppVeyor.Environment.JobId,
Version = version,
Repository = RepositoryInfo.Get(buildSystem, settings),
GitHubToken = gitHubToken,
Settings = settings,
Paths = new Paths(context),
};
}
}


Loading