migration to my git server

This commit is contained in:
Timerix 2024-09-20 02:57:30 +05:00
parent 359c8e25ca
commit 2c790f9b29
13 changed files with 25 additions and 38 deletions

8
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "DTLib.Ben.Demystifier"] [submodule "DTLib.Demystifier"]
path = DTLib.Ben.Demystifier path = DTLib.Demystifier
url = https://github.com/Timerix22/DTLib.Ben.Demystifier.git url = https://timerix.ddns.net:3322/Timerix/DTLib.Demystifier.git
[submodule "DTLib.XXHash"] [submodule "DTLib.XXHash"]
path = DTLib.XXHash path = DTLib.XXHash
url = https://github.com/Timerix22/DTLib.XXHash.git url = https://timerix.ddns.net:3322/Timerix/DTLib.XXHash.git

@ -1 +0,0 @@
Subproject commit 59de4eada9235dd50c1cb0021d0cb8bdcabdc611

1
DTLib.Demystifier Submodule

@ -0,0 +1 @@
Subproject commit b19c39b68463ae15c1f63051583da9f74d97baac

View File

@ -6,8 +6,8 @@
<Authors>Timerix</Authors> <Authors>Timerix</Authors>
<Description>DTLib logger wrapper with dependency injection</Description> <Description>DTLib logger wrapper with dependency injection</Description>
<RepositoryType>GIT</RepositoryType> <RepositoryType>GIT</RepositoryType>
<RepositoryUrl>https://github.com/Timerix22/DTLib</RepositoryUrl> <RepositoryUrl>https://timerix.ddns.net:3322/Timerix/DTLib</RepositoryUrl>
<PackageProjectUrl>https://github.com/Timerix22/DTLib</PackageProjectUrl> <PackageProjectUrl>https://timerix.ddns.net:3322/Timerix/DTLib</PackageProjectUrl>
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<!--compilation properties--> <!--compilation properties-->

@ -1 +1 @@
Subproject commit bcaa7a941104ce3f2bfa810b758d59728b77d4dd Subproject commit 895d53d362c83b114c9ca06467d2e24d407190c3

View File

@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DTLib", "DTLib\DTLib.csproj", "{B620E5E9-800F-4B2D-B4A5-062E05DB704F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DTLib", "DTLib\DTLib.csproj", "{B620E5E9-800F-4B2D-B4A5-062E05DB704F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Ben.Demystifier", "DTLib.Ben.Demystifier\DTLib.Ben.Demystifier.csproj", "{AC7CB524-4D59-42E0-9F96-1C201A92494B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Demystifier", "DTLib.Demystifier\DTLib.Demystifier.csproj", "{AC7CB524-4D59-42E0-9F96-1C201A92494B}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6308F24E-A4FF-46B3-B72F-30E05DDCB1D5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6308F24E-A4FF-46B3-B72F-30E05DDCB1D5}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject

View File

@ -6,8 +6,8 @@
<Authors>Timerix</Authors> <Authors>Timerix</Authors>
<Description>Library for all my C# projects</Description> <Description>Library for all my C# projects</Description>
<RepositoryType>GIT</RepositoryType> <RepositoryType>GIT</RepositoryType>
<RepositoryUrl>https://github.com/Timerix22/DTLib</RepositoryUrl> <RepositoryUrl>https://timerix.ddns.net:3322/Timerix/DTLib</RepositoryUrl>
<PackageProjectUrl>https://github.com/Timerix22/DTLib</PackageProjectUrl> <PackageProjectUrl>https://timerix.ddns.net:3322/Timerix/DTLib</PackageProjectUrl>
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<!--compilation properties--> <!--compilation properties-->
@ -28,9 +28,9 @@
<!--DTLib dependencies--> <!--DTLib dependencies-->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' "> <ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<ProjectReference Include="..\DTLib.Ben.Demystifier\DTLib.Ben.Demystifier.csproj" /> <ProjectReference Include="..\DTLib.Demystifier\DTLib.Demystifier.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(Configuration)' != 'Debug' "> <ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
<PackageReference Include="DTLib.Ben.Demystifier" Version="1.0.7" /> <PackageReference Include="DTLib.Demystifier" Version="1.1.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -5,12 +5,7 @@ public static class DtsodConverter
public static IDtsod ConvertVersion(IDtsod src, DtsodVersion targetVersion) public static IDtsod ConvertVersion(IDtsod src, DtsodVersion targetVersion)
=> targetVersion switch => targetVersion switch
{ {
DtsodVersion.V22 => throw new Exception("DtsodV22 is deprecated"),
DtsodVersion.V23 => new DtsodV23(src.ToDictionary()), DtsodVersion.V23 => new DtsodV23(src.ToDictionary()),
// DtsodVersion.V24 => new DtsodV24(src.ToDictionary()),
#if DEBUG
//DtsodVersion.V30 => new DtsodV30(src.ToDictionary()),
#endif
_ => throw new Exception($"DtsodConverter.Convert() error: unknown target version <{targetVersion}>"), _ => throw new Exception($"DtsodConverter.Convert() error: unknown target version <{targetVersion}>"),
}; };

View File

@ -2,12 +2,5 @@
public enum DtsodVersion : byte public enum DtsodVersion : byte
{ {
V21 = 21, V23 = 23
V22 = 22,
V23 = 23,
V24 = 24,
V25,
#if DEBUG
V30 = 30
#endif
} }

View File

@ -1,4 +1,4 @@
#if NETSTANDARD2_1 #if NETSTANDARD2_1 || NET6_0_OR_GREATER
#define USE_SPAN #define USE_SPAN
#endif #endif

View File

@ -1,4 +1,4 @@
using DTLib.Ben.Demystifier; using DTLib.Demystifier;
namespace DTLib.Logging; namespace DTLib.Logging;
@ -22,7 +22,7 @@ public static class LoggerExtensions
public static void LogWarn(this ILogger logger, string context, object message) public static void LogWarn(this ILogger logger, string context, object message)
=> logger.Log(context, LogSeverity.Warn, message); => logger.Log(context, LogSeverity.Warn, message);
/// uses Ben.Demystifier to serialize exception /// uses Demystifier to serialize exception
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void LogWarn(this ILogger logger, string context, Exception ex) public static void LogWarn(this ILogger logger, string context, Exception ex)
=> logger.Log(context, LogSeverity.Warn, ex.ToStringDemystified()); => logger.Log(context, LogSeverity.Warn, ex.ToStringDemystified());
@ -32,7 +32,7 @@ public static class LoggerExtensions
=> logger.Log(context, LogSeverity.Error, message); => logger.Log(context, LogSeverity.Error, message);
/// uses Ben.Demystifier to serialize exception /// uses Demystifier to serialize exception
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void LogError(this ILogger logger, string context, Exception ex) public static void LogError(this ILogger logger, string context, Exception ex)
=> logger.Log(context, LogSeverity.Error, ex.ToStringDemystified()); => logger.Log(context, LogSeverity.Error, ex.ToStringDemystified());

View File

@ -34,7 +34,7 @@ public class ContextLogger : ILogger
public void LogWarn(object message) public void LogWarn(object message)
=> ParentLogger.LogWarn(Context, message); => ParentLogger.LogWarn(Context, message);
/// uses Ben.Demystifier to serialize exception /// uses Demystifier to serialize exception
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void LogWarn(Exception ex) public void LogWarn(Exception ex)
=> ParentLogger.LogWarn(Context, ex); => ParentLogger.LogWarn(Context, ex);
@ -43,7 +43,7 @@ public class ContextLogger : ILogger
public void LogError(object message) public void LogError(object message)
=> ParentLogger.LogError(Context, message); => ParentLogger.LogError(Context, message);
/// uses Ben.Demystifier to serialize exception /// uses Demystifier to serialize exception
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void LogError(Exception ex) public void LogError(Exception ex)
=> ParentLogger.LogError(Context, ex); => ParentLogger.LogError(Context, ex);

11
pack.sh
View File

@ -1,13 +1,13 @@
#!/usr/bin/bash #!/usr/bin/bash
set -xe set -eo pipefail
if [[ -d nuget ]]; then if [[ -d nuget ]]; then
echo "archiving old ./nuget/ content"
mkdir -p nuget_old mkdir -p nuget_old
TIMESTAMP=$(date +%Y.%m.%d_%H-%M-%S) TIMESTAMP=$(date +%Y.%m.%d_%H-%M-%S)
mv nuget "nuget_$TIMESTAMP" mv nuget "nuget_$TIMESTAMP"
tar cvf "nuget_old/nuget_$TIMESTAMP.tar" "nuget_$TIMESTAMP" tar cvf "nuget_old/nuget_$TIMESTAMP.tar" "nuget_$TIMESTAMP"
rm -rf "nuget_$TIMESTAMP" rm -rf "nuget_$TIMESTAMP"
ls -lh nuget_old
fi fi
mkdir nuget mkdir nuget
@ -21,10 +21,9 @@ function create_package() {
cd .. cd ..
} }
set +x echo "building packages"
create_package DTLib.Ben.Demystifier create_package DTLib.Demystifier
create_package DTLib.XXHash create_package DTLib.XXHash
create_package DTLib create_package DTLib
create_package DTLib.Logging.Microsoft create_package DTLib.Logging.Microsoft
ls -shk nuget
ls -lh nuget