This commit is contained in:
nsnail 2022-11-30 11:47:29 +08:00
parent 5e17e20aab
commit a0aca21adb
3 changed files with 18 additions and 1 deletions

View File

@ -15,9 +15,11 @@ $files = Get-ChildItem -Path ./build/nupkgs/ -Filter *.nupkg
foreach($file in $files) foreach($file in $files)
{ {
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
nuget add $file.fullName -source d:\nuget-pkg
} }
$files = Get-ChildItem -Path ./build/nupkgs/ -Filter *.snupkg $files = Get-ChildItem -Path ./build/nupkgs/ -Filter *.snupkg
foreach($file in $files) foreach($file in $files)
{ {
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
nuget add $file.fullName -source d:\nuget-pkg
} }

View File

@ -34,4 +34,19 @@ public static class ByteExtensions
{ {
return me.HexDe(Encoding.UTF8); return me.HexDe(Encoding.UTF8);
} }
/// <summary>
/// 将字节数组转换成16进制字符串
/// </summary>
/// <param name="me"></param>
/// <param name="upperCase">是否大写</param>
/// <param name="splitShar">字节间分隔符</param>
/// <returns></returns>
public static string String(this byte[] me, bool upperCase = true, char? splitShar = '-')
{
var ret = BitConverter.ToString(me);
if (!upperCase) ret = ret.ToLower();
if (splitShar is not null && splitShar != '-') ret = ret.Replace('-', splitShar.Value);
return ret;
}
} }

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks> <TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Version>1.0.4</Version> <Version>1.0.5</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>