This commit is contained in:
JustArchi 2018-09-16 16:24:44 +02:00
parent b105b86859
commit c51afa77c6
4 changed files with 6 additions and 25 deletions

View file

@ -40,8 +40,7 @@ script:
publish() {
if [ "$1" = 'generic' ]; then
# TODO: Workaround https://github.com/mono/linker/issues/286 until it's resolved
# Don't forget to remove it from docker files too
# TODO: Workaround https://github.com/mono/linker/issues/286 (don't forget to remove it from docker files too)
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" --no-restore /nologo "/p:ASFVariant=$1" "/p:LinkDuringPublish=false"
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1" "/p:CrossGenDuringPublish=false"

View file

@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/JustArchi/ArchiSteamFarm</PackageProjectUrl>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/JustArchi/ArchiSteamFarm.git</RepositoryUrl>
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;net472</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;net472</TargetFrameworks>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>

View file

@ -21,7 +21,7 @@
<RepositoryUrl>https://github.com/JustArchi/ArchiSteamFarm.git</RepositoryUrl>
<RuntimeIdentifiers>linux-arm;linux-x64;osx-x64;win-x64</RuntimeIdentifiers>
<ServerGarbageCollection>false</ServerGarbageCollection>
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;net472</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;net472</TargetFrameworks>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
@ -55,11 +55,6 @@
<PackageReference Include="protobuf-net" Version="3.0.0-alpha.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="ILLink.Tasks" Version="0.1.5-preview-1841731" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="ILLink.Tasks" Version="0.1.5-preview-1841731" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.5.0" />

View file

@ -11,7 +11,6 @@ clone_depth: 10
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NET_CORE_FALLBACK_VERSION: netcoreapp2.0
NET_CORE_VERSION: netcoreapp2.1
NET_FRAMEWORK_VERSION: net472
VARIANTS: generic generic-netf linux-arm linux-x64 osx-x64 win-x64 # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in SharedInfo.cs!
@ -82,31 +81,19 @@ after_test:
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
$linkDuringPublish = 'true'
if ($variant -like '*-netf') {
$compressionMethod = 'Deflate' # This depends on what ZipArchive supports on given platform
$targetFramework = $env:NET_FRAMEWORK_VERSION
} elseif ($variant -eq 'linux-arm') {
# TODO: Workaround https://github.com/dotnet/coreclr/issues/18486
Write-Warning -Message "$variant is still targetting $env:NET_CORE_FALLBACK_VERSION, ensure to correct this once https://github.com/dotnet/coreclr/issues/18486 is resolved" -WarningAction Continue
$compressionMethod = 'Deflate64' # This depends on what ZipArchive supports on given platform
$targetFramework = $env:NET_CORE_FALLBACK_VERSION
} else {
$compressionMethod = 'Deflate64' # This depends on what ZipArchive supports on given platform
$targetFramework = $env:NET_CORE_VERSION
}
# TODO: Workaround https://github.com/mono/linker/issues/286 (don't forget to remove it from docker files too)
# TODO: Workaround https://github.com/dotnet/coreclr/issues/19896 (don't forget to remove it from docker files too)
if ($variant -like 'generic*' -or $targetFramework -eq $env:NET_CORE_FALLBACK_VERSION) {
$linkDuringPublish = 'false'
}
if ($variant -like 'generic*') {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" --no-restore /nologo "/p:ASFVariant=$variant" "/p:LinkDuringPublish=$linkDuringPublish" "/p:CrossGenDuringPublish=false"
# TODO: Workaround https://github.com/mono/linker/issues/286 (don't forget to remove it from docker files too)
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" --no-restore /nologo "/p:ASFVariant=$variant" "/p:LinkDuringPublish=false"
} else {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" -r "$variant" --no-restore /nologo "/p:ASFVariant=$variant" "/p:LinkDuringPublish=$linkDuringPublish" "/p:CrossGenDuringPublish=false"
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" -r "$variant" --no-restore /nologo "/p:ASFVariant=$variant" "/p:CrossGenDuringPublish=false"
}
if ($LastExitCode -ne 0) {