Optimize csprojs and STD plugin publishing

thanks to @Vital7 for the idea
This commit is contained in:
JustArchi
2020-11-21 18:09:05 +01:00
parent d896f16cbf
commit d9e3496e5e
8 changed files with 36 additions and 34 deletions

View File

@@ -133,9 +133,9 @@ jobs:
fi
# If we're including SteamTokenDumper plugin for this framework, copy it to output directory
if [ -f "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" ]; then
mkdir -p "out/${1}/plugins/${STEAM_TOKEN_DUMPER_NAME}"
cp "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/${STEAM_TOKEN_DUMPER_NAME}.dll" "out/${1}/plugins/${STEAM_TOKEN_DUMPER_NAME}"
if [ -d "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" ]; then
mkdir -p "out/${1}/plugins"
cp -pRT "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" "out/${1}/plugins/${STEAM_TOKEN_DUMPER_NAME}"
fi
# Include .ico file for all platforms, since only Windows script can bundle it inside the exe
@@ -208,12 +208,12 @@ jobs:
}
# If we're including SteamTokenDumper plugin for this framework, copy it to output directory
if (Test-Path "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework\$env:STEAM_TOKEN_DUMPER_NAME.dll" -PathType Leaf) {
if (Test-Path "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework" -PathType Container) {
if (!(Test-Path "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" -PathType Container)) {
New-Item -ItemType Directory -Path "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" > $null
}
Copy-Item "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework\$env:STEAM_TOKEN_DUMPER_NAME.dll" "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME"
Copy-Item "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework\*" "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME"
}
# Icon is available only in .NET Framework and .NET Core Windows build, we'll bundle the .ico file for other flavours