mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 14:30:31 +00:00
Misc
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
39
cc.sh
39
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! :)"
|
||||
|
||||
Reference in New Issue
Block a user