diff --git a/.travis.yml b/.travis.yml index ac95fe335..fa6efd935 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ script: set -e dotnet build ArchiSteamFarm -c "$CONFIGURATION" -o 'out/source' /nologo - dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' + dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' /nologo publish() { if [ "$1" = 'generic' ]; then diff --git a/ArchiSteamFarm/ArchiLogger.cs b/ArchiSteamFarm/ArchiLogger.cs index 2d0231154..7213087f8 100644 --- a/ArchiSteamFarm/ArchiLogger.cs +++ b/ArchiSteamFarm/ArchiLogger.cs @@ -53,7 +53,7 @@ namespace ArchiSteamFarm { // Otherwise, we ran into fatal exception before logging module could even get initialized, so activate fallback logging that involves file and console - string message = string.Format(DateTime.Now + Strings.ErrorEarlyFatalExceptionInfo + Environment.NewLine, SharedInfo.Version); + string message = string.Format(DateTime.Now + " " + Strings.ErrorEarlyFatalExceptionInfo + Environment.NewLine, SharedInfo.Version); try { await File.WriteAllTextAsync(SharedInfo.LogFile, message).ConfigureAwait(false); diff --git a/appveyor.yml b/appveyor.yml index a86c5930b..71e2a2fe1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -48,7 +48,7 @@ test_script: $ProgressPreference = 'SilentlyContinue' - dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -o 'out\source' + dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -o 'out\source' /nologo after_test: - pwsh: >- Set-StrictMode -Version Latest diff --git a/cc.sh b/cc.sh index 079a6db07..4bb583458 100755 --- a/cc.sh +++ b/cc.sh @@ -17,13 +17,19 @@ cd "$(dirname "$(readlink -f "$0")")" for ARG in "$@"; do case "$ARG" in - release|Release) CONFIGURATION="Release" ;; debug|Debug) CONFIGURATION="Debug" ;; + release|Release) CONFIGURATION="Release" ;; --clean) CLEAN=1 ;; + --no-clean) CLEAN=0 ;; + --link-during-publish) LINK_DURING_PUBLISH=1 ;; --no-link-during-publish) LINK_DURING_PUBLISH=0 ;; + --pull) PULL=1 ;; --no-pull) PULL=0 ;; + --shared-compilation) SHARED_COMPILATION=1 ;; --no-shared-compilation) SHARED_COMPILATION=0 ;; + --test) TEST=1 ;; --no-test) TEST=0 ;; + --help) echo "Usage: $0 [--clean] [--no-link-during-publish] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"; exit 0 ;; *) echo "Usage: $0 [--clean] [--no-link-during-publish] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"; exit 1 esac done @@ -46,35 +52,26 @@ if [[ ! -f "$SOLUTION" ]]; then exit 1 fi -SETUP_FLAGS=(-c "$CONFIGURATION" -o "$OUT") -BUILD_FLAGS=(--no-restore '/nologo') +DOTNET_FLAGS=(-c "$CONFIGURATION" -o "$OUT" '/nologo') if [[ "$LINK_DURING_PUBLISH" -eq 0 ]]; then - BUILD_FLAGS+=('/p:LinkDuringPublish=false') + DOTNET_FLAGS+=('/p:LinkDuringPublish=false') fi if [[ "$SHARED_COMPILATION" -eq 0 ]]; then - BUILD_FLAGS+=('/p:UseSharedCompilation=false') + DOTNET_FLAGS+=('/p:UseSharedCompilation=false') +fi + +if [[ "$CLEAN" -eq 1 ]]; then + dotnet clean "${DOTNET_FLAGS[@]}" + rm -rf "${MAIN_PROJECT:?}/${OUT}" "${TESTS_PROJECT:?}/${OUT}" fi if [[ "$TEST" -eq 1 ]]; then - if [[ "$CLEAN" -eq 1 ]]; then - dotnet clean "${SETUP_FLAGS[@]}" - rm -rf "${MAIN_PROJECT:?}/${OUT}" "${TESTS_PROJECT:?}/${OUT}" - fi - - dotnet restore - dotnet publish "${SETUP_FLAGS[@]}" "${BUILD_FLAGS[@]}" - dotnet test "$TESTS_PROJECT" "${SETUP_FLAGS[@]}" --no-build "${BUILD_FLAGS[@]}" -else - if [[ "$CLEAN" -eq 1 ]]; then - dotnet clean "$MAIN_PROJECT" "${SETUP_FLAGS[@]}" - rm -rf "${MAIN_PROJECT:?}/${OUT}" - fi - - dotnet restore "$MAIN_PROJECT" - dotnet publish "$MAIN_PROJECT" "${SETUP_FLAGS[@]}" "${BUILD_FLAGS[@]}" + dotnet test "$TESTS_PROJECT" "${DOTNET_FLAGS[@]}" fi +dotnet publish "$MAIN_PROJECT" "${DOTNET_FLAGS[@]}" + echo echo "Compilation finished successfully! :)"