Skip to content

Commit 5d480c4

Browse files
committed
Merge branch 'release/v1.0.2'
2 parents 770fb0c + d84bac7 commit 5d480c4

10 files changed

Lines changed: 657 additions & 11 deletions

File tree

.nuke/build.schema.json

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"$ref": "#/definitions/build",
4+
"title": "Build Schema",
5+
"definitions": {
6+
"build": {
7+
"type": "object",
8+
"properties": {
9+
"BuildNo": {
10+
"type": "integer",
11+
"description": "The Buildnumber provided by the CI"
12+
},
13+
"Configuration": {
14+
"type": "string",
15+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
16+
"enum": [
17+
"Debug",
18+
"Release"
19+
]
20+
},
21+
"Continue": {
22+
"type": "boolean",
23+
"description": "Indicates to continue a previously failed build attempt"
24+
},
25+
"Help": {
26+
"type": "boolean",
27+
"description": "Shows the help text for this build assembly"
28+
},
29+
"Host": {
30+
"type": "string",
31+
"description": "Host for execution. Default is 'automatic'",
32+
"enum": [
33+
"AppVeyor",
34+
"AzurePipelines",
35+
"Bamboo",
36+
"Bitbucket",
37+
"Bitrise",
38+
"GitHubActions",
39+
"GitLab",
40+
"Jenkins",
41+
"Rider",
42+
"SpaceAutomation",
43+
"TeamCity",
44+
"Terminal",
45+
"TravisCI",
46+
"VisualStudio",
47+
"VSCode"
48+
]
49+
},
50+
"IsRc": {
51+
"type": "boolean",
52+
"description": "Is RC Version"
53+
},
54+
"NoLogo": {
55+
"type": "boolean",
56+
"description": "Disables displaying the NUKE logo"
57+
},
58+
"Partition": {
59+
"type": "string",
60+
"description": "Partition to use on CI"
61+
},
62+
"Plan": {
63+
"type": "boolean",
64+
"description": "Shows the execution plan (HTML)"
65+
},
66+
"Profile": {
67+
"type": "array",
68+
"description": "Defines the profiles to load",
69+
"items": {
70+
"type": "string"
71+
}
72+
},
73+
"Root": {
74+
"type": "string",
75+
"description": "Root directory during build execution"
76+
},
77+
"Skip": {
78+
"type": "array",
79+
"description": "List of targets to be skipped. Empty list skips all dependencies",
80+
"items": {
81+
"type": "string",
82+
"enum": [
83+
"Clean",
84+
"Compile",
85+
"Deploy",
86+
"Release",
87+
"Restore",
88+
"Test"
89+
]
90+
}
91+
},
92+
"Solution": {
93+
"type": "string",
94+
"description": "Path to a solution file that is automatically loaded"
95+
},
96+
"Target": {
97+
"type": "array",
98+
"description": "List of targets to be invoked. Default is '{default_target}'",
99+
"items": {
100+
"type": "string",
101+
"enum": [
102+
"Clean",
103+
"Compile",
104+
"Deploy",
105+
"Release",
106+
"Restore",
107+
"Test"
108+
]
109+
}
110+
},
111+
"Verbosity": {
112+
"type": "string",
113+
"description": "Logging verbosity during build execution. Default is 'Normal'",
114+
"enum": [
115+
"Minimal",
116+
"Normal",
117+
"Quiet",
118+
"Verbose"
119+
]
120+
},
121+
"Version": {
122+
"type": "string",
123+
"description": "Version to be injected in the Build"
124+
}
125+
}
126+
}
127+
}
128+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## v1.0.2
8+
### Added
9+
- Added string Extensions for RemoveLeadingSlash and RemoveTrailingSlash
10+
- Added string Extensions for EnsureLeadingSlash and EnsureTrailingSlash
11+
- Enumeration for Separators
12+
713
## v1.0.1
814
### Fixed
915
- Fixed XML Documentation

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# http://www.appveyor.com/docs/appveyor-yml
22

33
environment:
4-
base_version: 1.0.1
4+
base_version: 1.0.2
55

66
# version format
77
version: $(base_version).{build}

build/Build.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ class Build : NukeBuild
3232
[GitRepository] readonly GitRepository GitRepository;
3333

3434
[Parameter("Version to be injected in the Build")]
35-
public string Version { get; set; } = $"1.0.1";
35+
public string Version { get; set; } = $"1.0.2";
3636

3737
[Parameter("The Buildnumber provided by the CI")]
38-
public int BuildNo = 1;
38+
public int BuildNo = 4;
3939

4040
[Parameter("Is RC Version")]
4141
public bool IsRc = false;

build/_build.csproj.DotSettings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EDelegateAllocation/@EntryIndexedValue">DO_NOT_SHOW</s:String>
33
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableHidesOuterVariable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
44
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
@@ -21,6 +21,7 @@
2121
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
2222
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
2323
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
24+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
2425
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
2526
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
2627
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
using System;
2+
3+
namespace Abstract.FileSystem.Internals
4+
{
5+
/// <summary>
6+
/// Base for enumerations
7+
/// </summary>
8+
public abstract class Enumeration : IComparable
9+
{
10+
/// <summary>
11+
/// Gets the Id
12+
/// </summary>
13+
public int Id { get; }
14+
15+
/// <summary>
16+
/// Gets the Name
17+
/// </summary>
18+
public string Name { get; }
19+
20+
protected Enumeration(string name)
21+
{
22+
Id = 0;
23+
Name = name;
24+
}
25+
26+
protected Enumeration(int id, string name)
27+
{
28+
Id = id;
29+
Name = name;
30+
}
31+
32+
/// <summary>
33+
/// The string value
34+
/// </summary>
35+
/// <returns></returns>
36+
public override string ToString()
37+
{
38+
return Name;
39+
}
40+
41+
/// <summary>
42+
/// Gets the lower string value
43+
/// </summary>
44+
/// <returns></returns>
45+
public string ToLower()
46+
{
47+
return Name.ToLower();
48+
}
49+
50+
/// <summary>
51+
///
52+
/// </summary>
53+
/// <param name="obj"></param>
54+
/// <returns></returns>
55+
public int CompareTo(object obj)
56+
{
57+
if (Id.CompareTo(((Enumeration)obj).Id) > 0 || string.Compare(Name, ((Enumeration)obj).Name, StringComparison.Ordinal) > 0)
58+
{
59+
return 1;
60+
}
61+
62+
if (Id.CompareTo(((Enumeration)obj).Id) == 0 && string.Compare(Name, ((Enumeration)obj).Name, StringComparison.Ordinal) == 0)
63+
{
64+
return 0;
65+
}
66+
67+
return -1;
68+
}
69+
70+
/// <summary>
71+
///
72+
/// </summary>
73+
/// <param name="left"></param>
74+
/// <param name="right"></param>
75+
/// <returns></returns>
76+
public static int Compare(Enumeration left, Enumeration right)
77+
{
78+
if (ReferenceEquals(left, right))
79+
{
80+
return 0;
81+
}
82+
83+
if (left is null)
84+
{
85+
return -1;
86+
}
87+
88+
return left.CompareTo(right);
89+
}
90+
91+
/// <summary>
92+
///
93+
/// </summary>
94+
/// <param name="obj"></param>
95+
/// <returns></returns>
96+
public override bool Equals(object obj)
97+
{
98+
if (obj is string v)
99+
{
100+
return ToString() == v;
101+
}
102+
103+
return obj is Enumeration en && en.Id == Id && en.ToLower() == ToLower();
104+
}
105+
106+
/// <summary>
107+
///
108+
/// </summary>
109+
/// <returns></returns>
110+
public override int GetHashCode()
111+
{
112+
return new { Id, Name }.GetHashCode();
113+
}
114+
115+
/// <summary>
116+
///
117+
/// </summary>
118+
/// <param name="en"></param>
119+
public static implicit operator string(Enumeration en)
120+
{
121+
return en.ToString();
122+
}
123+
124+
/// <summary>
125+
///
126+
/// </summary>
127+
/// <param name="left"></param>
128+
/// <param name="right"></param>
129+
/// <returns></returns>
130+
public static bool operator ==(Enumeration left, Enumeration right)
131+
{
132+
if (left is null)
133+
{
134+
return right is null;
135+
}
136+
137+
return left.Equals(right);
138+
}
139+
140+
/// <summary>
141+
///
142+
/// </summary>
143+
/// <param name="left"></param>
144+
/// <param name="right"></param>
145+
/// <returns></returns>
146+
public static bool operator !=(Enumeration left, Enumeration right)
147+
{
148+
return !(left == right);
149+
}
150+
151+
/// <summary>
152+
///
153+
/// </summary>
154+
/// <param name="left"></param>
155+
/// <param name="right"></param>
156+
/// <returns></returns>
157+
public static bool operator <(Enumeration left, Enumeration right)
158+
{
159+
return Compare(left, right) < 0;
160+
}
161+
162+
/// <summary>
163+
///
164+
/// </summary>
165+
/// <param name="left"></param>
166+
/// <param name="right"></param>
167+
/// <returns></returns>
168+
public static bool operator <=(Enumeration left, Enumeration right)
169+
{
170+
return Compare(left, right) <= 0;
171+
}
172+
173+
/// <summary>
174+
///
175+
/// </summary>
176+
/// <param name="left"></param>
177+
/// <param name="right"></param>
178+
/// <returns></returns>
179+
public static bool operator >(Enumeration left, Enumeration right)
180+
{
181+
return Compare(left, right) > 0;
182+
}
183+
184+
/// <summary>
185+
///
186+
/// </summary>
187+
/// <param name="left"></param>
188+
/// <param name="right"></param>
189+
/// <returns></returns>
190+
public static bool operator >=(Enumeration left, Enumeration right)
191+
{
192+
return Compare(left, right) >= 0;
193+
}
194+
}
195+
}

0 commit comments

Comments
 (0)