Skip to content

Commit

Permalink
update to recent breaking change with LogNullError
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudokhvist committed May 4, 2022
1 parent 81f0f0e commit 45fbda1
Show file tree
Hide file tree
Showing 5 changed files with 449 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ArchiSteamFarm
Submodule ArchiSteamFarm updated 254 files
4 changes: 2 additions & 2 deletions ItemDispenser/ItemDispenser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ItemDispenser : IBotTradeOffer, IBotModules {

public async Task<bool> OnBotTradeOffer(Bot bot, TradeOffer tradeOffer) {
if (tradeOffer == null) {
ASF.ArchiLogger.LogNullError(nameof(tradeOffer));
ASF.ArchiLogger.LogNullError(tradeOffer);
return false;
}

Expand Down Expand Up @@ -90,7 +90,7 @@ public Task OnBotInitModules(Bot bot, IReadOnlyDictionary<string, JToken>? addit
try {
dispenseItems = jToken.Value<JArray>()?.ToObject<ConcurrentHashSet<DispenseItem>>();
if (dispenseItems == null) {
bot.ArchiLogger.LogNullError(nameof(dispenseItems));
bot.ArchiLogger.LogNullError(dispenseItems);
return Task.CompletedTask;
}
BotSettings.AddOrUpdate(bot, dispenseItems, (k, v) => dispenseItems);
Expand Down
2 changes: 1 addition & 1 deletion ItemDispenser/ItemDispenser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Authors>Ryzhehvost</Authors>
<AssemblyVersion>0.3.1.0</AssemblyVersion>
<AssemblyVersion>0.3.1.1</AssemblyVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
22 changes: 21 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ rem release generic version
dotnet publish -c "Release" -f "net6.0" -o "out/generic" "/p:LinkDuringPublish=false"
mkdir .\out\%CurrDirName%
copy .\out\generic\%CurrDirName%.dll .\out\%CurrDirName%
rem comment section below (downto :zip label) if you don't want to include documentation
if not exist README.md (goto zip)
where /q pandoc.exe
if ERRORLEVEL 1 (
copy README.md .\out\%CurrDirName%
goto zip
) else (
pandoc --metadata title="%CurrDirName%" --standalone --columns 2000 -f markdown -t html --self-contained -c .\github-pandoc.css -o .\out\%CurrDirName%\README.html README.md
)
:zip
7z a -tzip -mx7 .\out\%CurrDirName%.zip .\out\%CurrDirName%
rmdir /Q /S out\%CurrDirName%

Expand All @@ -33,5 +43,15 @@ rem comment section below if you don't target netf ASF version
dotnet publish -c "Release" -f "net48" -o "out/generic-netf"
mkdir .\out\%CurrDirName%
copy .\out\generic-netf\%CurrDirName%.dll .\out\%CurrDirName%
rem comment section below (downto :zipnetf label) if you don't want to include documentation
if not exist README.md (goto zipnetf)
where /q pandoc.exe
if ERRORLEVEL 1 (
copy README.md .\out\%CurrDirName%
goto zipnetf
) else (
pandoc --metadata title="%CurrDirName%" --standalone --columns 2000 -f markdown -t html --self-contained -c .\github-pandoc.css -o .\out\%CurrDirName%\README.html README.md
)
:zipnetf
7z a -tzip -mx7 .\out\%CurrDirName%-netf.zip .\out\%CurrDirName%
rmdir /Q /S out\%CurrDirName%
rmdir /Q /S out\%CurrDirName%
Loading

0 comments on commit 45fbda1

Please sign in to comment.