Skip to content

Commit

Permalink
implement support for nullable reference variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudokhvist committed Sep 8, 2020
1 parent 700b40e commit 4c20733
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
2 changes: 1 addition & 1 deletion ArchiSteamFarm
Submodule ArchiSteamFarm updated 193 files
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<Authors>Ryzhehvost</Authors>
<AssemblyVersion>0.2</AssemblyVersion>
<TargetFrameworks>netcoreapp3.1;net48</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -14,8 +16,4 @@
<ProjectReference Include="..\ArchiSteamFarm\ArchiSteamFarm\ArchiSteamFarm.csproj" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="mkdir $(TargetDir)CaseInsensitiveASF&#xD;&#xA;copy $(TargetPath) $(TargetDir)CaseInsensitiveASF\&#xD;&#xA;7z a -tzip -mx7 CaseInsensitiveASF.zip $(TargetDir)CaseInsensitiveASF" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion Ryzhehvost.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 34 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
@@ -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"
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%

0 comments on commit 4c20733

Please sign in to comment.