Introduce UpdatePeriod

Direct AutoUpdates replacement, also get rid of ArchiSteamFarm.version, since I'm pretty sure it can be done at compile time instead.
This commit is contained in:
JustArchi
2017-11-29 01:22:40 +01:00
parent a986963b5c
commit fdd8eb408b
8 changed files with 62 additions and 109 deletions

View File

@@ -23,7 +23,7 @@ env:
- CONFIGURATION: Release
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64" # https://github.com/travis-ci/travis-ci/issues/1444
- VARIANTS="generic win-x64 linux-x64 linux-arm osx-x64" # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in ASF.cs!
before_script:
- |
@@ -43,21 +43,22 @@ script:
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
publish() {
if [ "$1" = 'generic' ]; then
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo /p:LinkDuringPublish=false
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo
fi
local variantProperty="${1//-/_}"
variantProperty="ASF_VARIANT_${variantProperty^^}=1"
echo "$1" > "ArchiSteamFarm/out/${1}/ArchiSteamFarm.version"
if [ "$1" = 'generic' ]; then
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo "/p:$variantProperty" /p:LinkDuringPublish=false
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:$variantProperty"
fi
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
cp "ArchiSteamFarm/scripts/${1}/"* "ArchiSteamFarm/out/${1}"
fi
}
for RUNTIME in $RUNTIMES; do
publish "$RUNTIME" &
for variant in $VARIANTS; do
publish "$variant" &
done
wait