mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Fix preprocessor definition detection
Also wow, I had no idea that even .csproj files handled by msbuild support C# operations, this is freaking awesome.
This commit is contained in:
parent
fdd8eb408b
commit
55cdb5d0d9
3 changed files with 8 additions and 9 deletions
|
@ -43,13 +43,10 @@ script:
|
||||||
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
|
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
|
||||||
|
|
||||||
publish() {
|
publish() {
|
||||||
local variantProperty="${1//-/_}"
|
|
||||||
variantProperty="ASF_VARIANT_${variantProperty^^}=1"
|
|
||||||
|
|
||||||
if [ "$1" = 'generic' ]; then
|
if [ "$1" = 'generic' ]; then
|
||||||
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo "/p:$variantProperty" /p:LinkDuringPublish=false
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo "/p:ASFVariant=$1" /p:LinkDuringPublish=false
|
||||||
else
|
else
|
||||||
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:$variantProperty"
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
|
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
|
||||||
|
|
|
@ -30,6 +30,10 @@
|
||||||
<WarningsAsErrors />
|
<WarningsAsErrors />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(ASFVariant)'!=''">
|
||||||
|
<DefineConstants>$(DefineConstants);ASF_VARIANT_$(ASFVariant.Replace('-', '_').ToUpperInvariant())</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.6.5" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.6.5" />
|
||||||
<PackageReference Include="Humanizer" Version="2.2.0" />
|
<PackageReference Include="Humanizer" Version="2.2.0" />
|
||||||
|
|
|
@ -65,12 +65,10 @@ after_test:
|
||||||
|
|
||||||
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
|
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
|
||||||
|
|
||||||
$variantProperty = 'ASF_VARIANT_' + $Variant.Replace('-', '_').ToUpperInvariant() + '=1'
|
|
||||||
|
|
||||||
if ($Variant -eq 'generic') {
|
if ($Variant -eq 'generic') {
|
||||||
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" --no-restore /nologo "/p:$variantProperty" /p:LinkDuringPublish=false
|
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" --no-restore /nologo "/p:ASFVariant=$Variant" /p:LinkDuringPublish=false
|
||||||
} else {
|
} else {
|
||||||
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" -r "$Variant" --no-restore /nologo "/p:$variantProperty"
|
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" -r "$Variant" --no-restore /nologo "/p:ASFVariant=$Variant"
|
||||||
}
|
}
|
||||||
|
|
||||||
# If we include any helper scripts for this variant, copy them to output directory
|
# If we include any helper scripts for this variant, copy them to output directory
|
||||||
|
|
Loading…
Reference in a new issue