Compare commits
8 Commits
v1.0.0
...
hotfix/che
| Author | SHA1 | Date | |
|---|---|---|---|
| eebd8f950a | |||
| fd70567062 | |||
| 0d313d2bb4 | |||
| acf2692955 | |||
| 71173053df | |||
| b91111eaa5 | |||
| d0968e1586 | |||
| 5e7b04efec |
@@ -21,23 +21,28 @@ jobs:
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
- name: Calculate Version
|
||||
id: version
|
||||
run: |
|
||||
TAG=$(git describe --tags --abbrev=0)
|
||||
COMMITS=$(git rev-list $TAG..HEAD --count)
|
||||
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v0
|
||||
with:
|
||||
versionSpec: '5.x'
|
||||
BASE=${TAG#v}
|
||||
|
||||
- name: Determine Version
|
||||
id: gitversion
|
||||
uses: gittools/actions/gitversion/execute@v0
|
||||
IFS='.' read MAJOR MINOR PATCH <<< "$BASE"
|
||||
|
||||
NEW_PATCH=$((PATCH + COMMITS))
|
||||
|
||||
VERSION="$MAJOR.$MINOR.$NEW_PATCH"
|
||||
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
- name: Build
|
||||
run: dotnet build -c Release
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
dotnet pack \
|
||||
-p:PackageVersion=${{ steps.gitversion.outputs.semVer }} \
|
||||
-p:PackageVersion=${{ steps.version.outputs.VERSION }} \
|
||||
-c Release
|
||||
|
||||
- name: Publish
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
obj
|
||||
bin
|
||||
.packages
|
||||
bin
|
||||
@@ -1,7 +1,44 @@
|
||||
namespace SJK.Functional;
|
||||
|
||||
/// <summary>
|
||||
/// Provides methods to convert values into tuples.
|
||||
/// </summary>
|
||||
public static class TupleExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts two values of any type into a tuple.
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">The type of the first value.</typeparam>
|
||||
/// <typeparam name="T2">The type of the second value.</typeparam>
|
||||
/// <param name="first">The first value to convert.</param>
|
||||
/// <param name="second">The second value to convert.</param>
|
||||
/// <returns>A tuple containing both values.</returns>
|
||||
public static (T1, T2) ToTuple<T1, T2>(this T1 first, T2 second) => (first, second);
|
||||
|
||||
/// <summary>
|
||||
/// Converts three values of any type into a tuple.
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">The type of the first value.</typeparam>
|
||||
/// <typeparam name="T2">The type of the second value.</typeparam>
|
||||
/// <typeparam name="T3">The type of the third value.</typeparam>
|
||||
/// <param name="first">The first value to convert.</param>
|
||||
/// <param name="second">The second value to convert.</param>
|
||||
/// <param name="third">The third value to convert.</param>
|
||||
/// <returns>A tuple containing all three values.</returns>
|
||||
public static (T1, T2, T3) ToTuple<T1, T2, T3>(this T1 first, T2 second, T3 third) => (first, second, third);
|
||||
|
||||
/// <summary>
|
||||
/// Converts four values of any type into a tuple.
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">The type of the first value.</typeparam>
|
||||
/// <typeparam name="T2">The type of the second value.</typeparam>
|
||||
/// <typeparam name="T3">The type of the third value.</typeparam>
|
||||
/// <typeparam name="T4">The type of the fourth value.</typeparam>
|
||||
/// <param name="first">The first value to convert.</param>
|
||||
/// <param name="second">The second value to convert.</param>
|
||||
/// <param name="third">The third value to convert.</param>
|
||||
/// <param name="forth">The fourth value to convert.</param>
|
||||
/// <returns>A tuple containing all four values.</returns>
|
||||
public static (T1, T2, T3, T4) ToTuple<T1, T2, T3, T4>(this T1 first, T2 second, T3 third, T4 forth) => (first, second, third, forth);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
mode: ContinuousDelivery
|
||||
|
||||
branches:
|
||||
main:
|
||||
increment: Patch
|
||||
feature:
|
||||
increment: Minor
|
||||
hotfix:
|
||||
increment: Patch
|
||||
@@ -5,6 +5,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user