Skip to content

Commit

Permalink
Path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jjxtra committed Mar 3, 2022
1 parent 90b56fd commit 6058aea
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions IPBan/CreatePackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ mkdir ./package
# Convenience function to exit out if last command fail
function CheckFail
{
if (-Not ($?))
#if (-Not ($?))
if ($LASTEXITCODE -ne 0)
{
echo "Fatal error"
echo "Fatal error: $LASTEXITCODE"
exit -1
}
}
Expand All @@ -36,20 +37,20 @@ function CodeSign($folder, $checkFail)
& taskkill /im dotnet.exe /F

# IPBan Linux x64
& "c:/program files/dotnet/dotnet.exe" restore -r linux-x64; CheckFail
& "c:/program files/dotnet/dotnet.exe" clean -c Release; CheckFail
& "c:/program files/dotnet/dotnet.exe" publish IPBan.csproj --self-contained -f $netFrameworkVersion -o package/linux-x64 -c Release -r linux-x64 /p:DebuggerSupport=false /p:CopyOutputSymbolsToPublishDirectory=false /p:Version=$versionDots /p:AssemblyVersion=$versionDots /p:FileVersion=$versionDots /p:PublishTrimmed=$publishTrimmed /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true; CheckFail
& dotnet restore -r linux-x64; CheckFail
& dotnet clean -c Release; CheckFail
& dotnet publish IPBan.csproj --self-contained -f $netFrameworkVersion -o package/linux-x64 -c Release -r linux-x64 /p:DebuggerSupport=false /p:CopyOutputSymbolsToPublishDirectory=false /p:Version=$versionDots /p:AssemblyVersion=$versionDots /p:FileVersion=$versionDots /p:PublishTrimmed=$publishTrimmed /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true; CheckFail

# IPBan Windows x64
& "c:/program files/dotnet/dotnet.exe" restore -r win-x64; CheckFail
& "c:/program files/dotnet/dotnet.exe" clean -c Release; CheckFail
& "c:/program files/dotnet/dotnet.exe" publish IPBan.csproj --self-contained -f $netFrameworkVersion -o package/win-x64 -c Release -r win-x64 /p:DebuggerSupport=false /p:CopyOutputSymbolsToPublishDirectory=false /p:Version=$versionDots /p:AssemblyVersion=$versionDots /p:FileVersion=$versionDots /p:PublishTrimmed=$publishTrimmed /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true; CheckFail
& dotnet restore -r win-x64; CheckFail
& dotnet clean -c Release; CheckFail
& dotnet publish IPBan.csproj --self-contained -f $netFrameworkVersion -o package/win-x64 -c Release -r win-x64 /p:DebuggerSupport=false /p:CopyOutputSymbolsToPublishDirectory=false /p:Version=$versionDots /p:AssemblyVersion=$versionDots /p:FileVersion=$versionDots /p:PublishTrimmed=$publishTrimmed /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true; CheckFail
CodeSign package/win-x64 CheckFail

# IPBan Windows x86
& "c:/program files (x86)/dotnet/dotnet.exe" restore -r win-x86; CheckFail
& "c:/program files (x86)/dotnet/dotnet.exe" clean -c Release; CheckFail
& "c:/program files (x86)/dotnet/dotnet.exe" publish IPBan.csproj --self-contained -f $netFrameworkVersion -o package/win-x86 -c Release -r win-x86 /p:Version=$versionDots /p:AssemblyVersion=$versionDots /p:FileVersion=$versionDots /p:PublishTrimmed=$publishTrimmed /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true; CheckFail
& dotnet restore -r win-x86; CheckFail
& dotnet clean -c Release; CheckFail
& dotnet publish IPBan.csproj --self-contained -f $netFrameworkVersion -o package/win-x86 -c Release -r win-x86 /p:Version=$versionDots /p:AssemblyVersion=$versionDots /p:FileVersion=$versionDots /p:PublishTrimmed=$publishTrimmed /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true; CheckFail
CodeSign package/win-x86 CheckFail

Compress-Archive -Path ./package/linux-x64/* -DestinationPath ./package/IPBan-Linux-x64_$version.zip; CheckFail
Expand Down

0 comments on commit 6058aea

Please sign in to comment.