Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
-upgraded to .NET6
-upgraded all dependencies
-fixed: calculation of unverified addresses
-fixed: build script refactored
  • Loading branch information
JannemanDev committed Mar 14, 2022
1 parent 4b97cc8 commit 752a533
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 91 deletions.
58 changes: 58 additions & 0 deletions buildAll-AutoSendFunds.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
set version=0.13
set dotnetcore=net6.0
set solutionfolder=C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds\
set projectsubfolder=source\AutoSendFunds\
set project=AutoSendFunds

rem Root solution folder
if not exist "%solutionfolder%" (goto error)
if not exist "%solutionfolder%%projectsubfolder%" (goto error)
cd /d %solutionfolder%

rem Delete previous Builds folder
if exist "Builds\%dotnetcore%\" rmdir /q /s Builds\%dotnetcore%
mkdir Builds\%dotnetcore%

rem Delete previous bin folder of project (will get auto created when building)
if exist "%projectsubfolder%bin\" rmdir /q /s "%projectsubfolder%bin"

rem Public .NET Core versions
dotnet publish %projectsubfolder%%project%.csproj /p:PublishProfile=%projectsubfolder%Properties\PublishProfiles\linux-arm-%dotnetcore%.pubxml --configuration Release
dotnet publish %projectsubfolder%%project%.csproj /p:PublishProfile=%projectsubfolder%Properties\PublishProfiles\linux-x64-%dotnetcore%.pubxml --configuration Release
dotnet publish %projectsubfolder%%project%.csproj /p:PublishProfile=%projectsubfolder%Properties\PublishProfiles\osx-x64-%dotnetcore%.pubxml --configuration Release
dotnet publish %projectsubfolder%%project%.csproj /p:PublishProfile=%projectsubfolder%Properties\PublishProfiles\win-x64-%dotnetcore%.pubxml --configuration Release
dotnet publish %projectsubfolder%%project%.csproj /p:PublishProfile=%projectsubfolder%Properties\PublishProfiles\win-x86-%dotnetcore%.pubxml --configuration Release

rem Check if building above worked
if not exist "%projectsubfolder%bin\Release\%dotnetcore%\publish\" (goto error)

rem Rar all project builds
cd /d "%solutionfolder%"
cd %projectsubfolder%bin\Release\%dotnetcore%\publish\linux-arm\
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\%dotnetcore%\%project%-%version%-linux-arm-%dotnetcore%.rar *.*

cd /d "%solutionfolder%"
cd %projectsubfolder%bin\Release\%dotnetcore%\publish\linux-x64\
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\%dotnetcore%\%project%-%version%-linux-x64-%dotnetcore%.rar *.*

cd /d "%solutionfolder%"
cd %projectsubfolder%bin\Release\%dotnetcore%\publish\osx-x64\
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\%dotnetcore%\%project%-%version%-osx-x64-%dotnetcore%.rar *.*

cd /d "%solutionfolder%"
cd %projectsubfolder%bin\Release\%dotnetcore%\publish\win-x64\
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\%dotnetcore%\%project%-%version%-win-x64-%dotnetcore%.rar *.*

cd /d "%solutionfolder%"
cd %projectsubfolder%bin\Release\%dotnetcore%\publish\win-x86\
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\%dotnetcore%\%project%-%version%-win-x86-%dotnetcore%.rar *.*

cd /d "%solutionfolder%"

goto done

:error
echo Something went wrong. Directory does not exist!
goto done

:done
80 changes: 1 addition & 79 deletions buildAll.bat
Original file line number Diff line number Diff line change
@@ -1,79 +1 @@
set version=0.13

rem Root solution folder
cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"


rem Delete Builds folder
del /f /q /s Builds\*.* > nul
rmdir /q /s Builds
mkdir Builds


rem Delete bin folder of AutoSendFunds
del /f /q /s source\AutoSendFunds\bin\*.* > nul
rmdir /q /s source\AutoSendFunds\bin

dotnet publish source\AutoSendFunds\AutoSendFunds.csproj /p:PublishProfile=source\AutoSendFunds\Properties\PublishProfiles\linux-arm.pubxml --configuration Release
dotnet publish source\AutoSendFunds\AutoSendFunds.csproj /p:PublishProfile=source\AutoSendFunds\Properties\PublishProfiles\linux-x64.pubxml --configuration Release
dotnet publish source\AutoSendFunds\AutoSendFunds.csproj /p:PublishProfile=source\AutoSendFunds\Properties\PublishProfiles\osx-x64.pubxml --configuration Release
dotnet publish source\AutoSendFunds\AutoSendFunds.csproj /p:PublishProfile=source\AutoSendFunds\Properties\PublishProfiles\win-x64.pubxml --configuration Release
dotnet publish source\AutoSendFunds\AutoSendFunds.csproj /p:PublishProfile=source\AutoSendFunds\Properties\PublishProfiles\win-x86.pubxml --configuration Release


rem Delete bin folder of AddressBookWebService
del /f /q /s source\AddressBookWebService\bin\*.* > nul
rmdir /q /s source\AddressBookWebService\bin

dotnet publish source\AddressBookWebService\AddressBookWebService.csproj /p:PublishProfile=source\AddressBookWebService\Properties\PublishProfiles\linux-arm.pubxml --configuration Release
dotnet publish source\AddressBookWebService\AddressBookWebService.csproj /p:PublishProfile=source\AddressBookWebService\Properties\PublishProfiles\linux-x64.pubxml --configuration Release
dotnet publish source\AddressBookWebService\AddressBookWebService.csproj /p:PublishProfile=source\AddressBookWebService\Properties\PublishProfiles\osx-x64.pubxml --configuration Release
dotnet publish source\AddressBookWebService\AddressBookWebService.csproj /p:PublishProfile=source\AddressBookWebService\Properties\PublishProfiles\win-x64.pubxml --configuration Release
dotnet publish source\AddressBookWebService\AddressBookWebService.csproj /p:PublishProfile=source\AddressBookWebService\Properties\PublishProfiles\win-x86.pubxml --configuration Release


rem Rar all AddressBookWebService builds
cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AddressBookWebService\bin\Release\net5.0\linux-arm\publish
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AddressBookWebService-%version%-linux-arm.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AddressBookWebService\bin\Release\net5.0\linux-x64\publish
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AddressBookWebService-%version%-linux-x64.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AddressBookWebService\bin\Release\net5.0\osx-x64\publish
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AddressBookWebService-%version%-osx-x64.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AddressBookWebService\bin\Release\net5.0\win-x64\publish
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AddressBookWebService-%version%-win-x64.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AddressBookWebService\bin\Release\net5.0\win-x86\publish
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AddressBookWebService-%version%-win-x86.rar *.*


rem Rar all AutoSendFunds builds
cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AutoSendFunds\bin\Release\net5.0\publish\linux-arm
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AutoSendFunds-%version%-linux-arm.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AutoSendFunds\bin\Release\net5.0\publish\linux-x64
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AutoSendFunds-%version%-linux-x64.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AutoSendFunds\bin\Release\net5.0\publish\osx-x64
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AutoSendFunds-%version%-osx-x64.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AutoSendFunds\bin\Release\net5.0\publish\win-x64
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AutoSendFunds-%version%-win-x64.rar *.*

cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
cd source\AutoSendFunds\bin\Release\net5.0\publish\win-x86
"C:\Program Files\WinRAR\rar.exe" a -r ..\..\..\..\..\..\..\Builds\AutoSendFunds-%version%-win-x86.rar *.*


cd /d "C:\MyData\Persoonlijk\IOTA\IOTA-Pollen-AutoSendFunds"
call buildAll-AutoSendFunds.bat
8 changes: 4 additions & 4 deletions source/AutoSendFunds/AutoSendFunds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>IOTA_Pollen_AutoSendFunds</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.3.2" />
<PackageReference Include="CliWrap" Version="3.4.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion source/AutoSendFunds/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
// option to verify nodes when loading
// test when node is offline later on... will it keep running?

// verifyaddress mbv website werkt niet als wallet net gemaakt is of nog geen txs zijn gedaan!
// sommige API van nodes hebben login/ww nodig (gebruiken reverse proxy) -> node lijst uitbreiden hiermee

namespace IOTA_Pollen_AutoSendFunds
{
class Program
Expand Down Expand Up @@ -438,7 +441,7 @@ private static List<Address> LoadReceiveAddresses(CliWallet cliWallet, AddressSe
int count = receiveAddresses.Count;

receiveAddresses = receiveAddresses.Where(receiveAddress => receiveAddress.IsVerified).ToList();
int delta = receiveAddresses.Count;
int delta = count - receiveAddresses.Count;

if (delta > 0) Log.Logger.Information($"Skipped {delta} unverified receive addresses");
Log.Logger.Information($"Total verified receive addresses: {receiveAddresses.Count}");
Expand Down
14 changes: 7 additions & 7 deletions source/SharedLib/SharedLib.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JsonFlatFileDataStore" Version="2.2.2" />
<PackageReference Include="JsonFlatFileDataStore" Version="2.2.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Polly" Version="7.2.2" />
<PackageReference Include="RestSharp" Version="106.11.7" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="RestSharp" Version="106.15.0" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="SimpleBase" Version="3.0.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="SimpleBase" Version="3.1.0" />
</ItemGroup>

</Project>

0 comments on commit 752a533

Please sign in to comment.