From 4c207338184547d9d3d08280df01683c0353c7c7 Mon Sep 17 00:00:00 2001 From: Ryzhehvost Date: Tue, 8 Sep 2020 15:15:47 +0300 Subject: [PATCH] implement support for nullable reference variables --- .gitignore | 1 + ArchiSteamFarm | 2 +- .../Case-Insensitive-ASF.csproj | 6 +-- .../CaseInsensitiveASF.cs | 2 +- Ryzhehvost.sln | 2 +- build.bat | 37 +++++++++++++++++-- 6 files changed, 40 insertions(+), 10 deletions(-) rename Ryzhehvost.CaseInsensitiveASF/Ryzhehvost.CaseInsensitiveASF.csproj => CaseInsensitiveASF/Case-Insensitive-ASF.csproj (62%) rename {Ryzhehvost.CaseInsensitiveASF => CaseInsensitiveASF}/CaseInsensitiveASF.cs (93%) diff --git a/.gitignore b/.gitignore index 5afe9c5..831b792 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ bld/ # Visual Studio 2015/2017 cache/options directory .vs/ +.vscode/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ diff --git a/ArchiSteamFarm b/ArchiSteamFarm index 3d60ca4..f51d9c3 160000 --- a/ArchiSteamFarm +++ b/ArchiSteamFarm @@ -1 +1 @@ -Subproject commit 3d60ca41d335dca6c9abbe033eef8e2e992ef3d1 +Subproject commit f51d9c36b0f96a449f99883bada2a0ac8fe49479 diff --git a/Ryzhehvost.CaseInsensitiveASF/Ryzhehvost.CaseInsensitiveASF.csproj b/CaseInsensitiveASF/Case-Insensitive-ASF.csproj similarity index 62% rename from Ryzhehvost.CaseInsensitiveASF/Ryzhehvost.CaseInsensitiveASF.csproj rename to CaseInsensitiveASF/Case-Insensitive-ASF.csproj index 85996d2..c6457b3 100644 --- a/Ryzhehvost.CaseInsensitiveASF/Ryzhehvost.CaseInsensitiveASF.csproj +++ b/CaseInsensitiveASF/Case-Insensitive-ASF.csproj @@ -4,6 +4,8 @@ Ryzhehvost 0.2 netcoreapp3.1;net48 + enable + latest @@ -14,8 +16,4 @@ - - - - diff --git a/Ryzhehvost.CaseInsensitiveASF/CaseInsensitiveASF.cs b/CaseInsensitiveASF/CaseInsensitiveASF.cs similarity index 93% rename from Ryzhehvost.CaseInsensitiveASF/CaseInsensitiveASF.cs rename to CaseInsensitiveASF/CaseInsensitiveASF.cs index 5dafc6e..4e3258b 100644 --- a/Ryzhehvost.CaseInsensitiveASF/CaseInsensitiveASF.cs +++ b/CaseInsensitiveASF/CaseInsensitiveASF.cs @@ -7,7 +7,7 @@ namespace Ryzhehvost.CaseInsensitiveASF { [Export(typeof(IPlugin))] public sealed class CaseInsensitiveASF : IBotsComparer { public string Name => nameof(CaseInsensitiveASF); - public Version Version => typeof(CaseInsensitiveASF).Assembly.GetName().Version; + public Version Version => typeof(CaseInsensitiveASF).Assembly.GetName().Version ?? new Version("0"); public void OnLoaded() { ASF.ArchiLogger.LogGenericInfo("Case Insensitive ASF Plugin by Ryzhehvost, powered by ginger cats"); diff --git a/Ryzhehvost.sln b/Ryzhehvost.sln index f71b111..c15a9f3 100644 --- a/Ryzhehvost.sln +++ b/Ryzhehvost.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28307.271 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryzhehvost.CaseInsensitiveASF", "Ryzhehvost.CaseInsensitiveASF\Ryzhehvost.CaseInsensitiveASF.csproj", "{8026B261-F883-4BED-976A-4E2140942610}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Case-Insensitive-ASF", "CaseInsensitiveASF\Case-Insensitive-ASF.csproj", "{8026B261-F883-4BED-976A-4E2140942610}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiSteamFarm", "ArchiSteamFarm\ArchiSteamFarm\ArchiSteamFarm.csproj", "{CDCA6F25-8860-4F72-91D1-F1F473732C1E}" EndProject diff --git a/build.bat b/build.bat index 3e88e65..7b15598 100644 --- a/build.bat +++ b/build.bat @@ -1,6 +1,37 @@ +@echo off +rem getting current dir name by Tamara Wijsman, https://superuser.com/questions/160702 +for %%I in (.) do set CurrDirName=%%~nxI + +rem download submodule if not exist ArchiSteamFarm\ArchiSteamFarm (git submodule update --init) + +if [%1]==[] goto noarg +rem update submodule to required tag, if specified... +git submodule foreach "git fetch origin; git checkout %1;" +goto continue +:noarg +rem ...otherwise update submodule to latest tag git submodule foreach "git fetch origin; git checkout $(git rev-list --tags --max-count=1);" -del .\Ryzhehvost.CaseInsensitiveASF\*.zip +:continue +rem print what version we are building for +git submodule foreach "git describe --tags;" + +rem wipe out old build +if exist out rmdir /Q /S out + +rem release generic version + +dotnet publish -c "Release" -f "netcoreapp3.1" -o "out/generic" "/p:LinkDuringPublish=false" +mkdir .\out\%CurrDirName% +copy .\out\generic\%CurrDirName%.dll .\out\%CurrDirName% +7z a -tzip -mx7 .\out\%CurrDirName%.zip .\out\%CurrDirName% +rmdir /Q /S out\%CurrDirName% + +rem release generic-netf version +rem comment section below if you don't target netf ASF version + dotnet publish -c "Release" -f "net48" -o "out/generic-netf" -rename .\Ryzhehvost.CaseInsensitiveASF\CaseInsensitiveASF.zip CaseInsensitiveASF-netf.zip -dotnet publish -c "Release" -f "netcoreapp3.1" -o "out/generic" "/p:LinkDuringPublish=false" \ No newline at end of file +mkdir .\out\%CurrDirName% +copy .\out\generic-netf\%CurrDirName%.dll .\out\%CurrDirName% +7z a -tzip -mx7 .\out\%CurrDirName%-netf.zip .\out\%CurrDirName% +rmdir /Q /S out\%CurrDirName% \ No newline at end of file