mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-18 07:20:30 +00:00
Misc
This commit is contained in:
@@ -41,7 +41,7 @@ script:
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -o 'out/source' /nologo
|
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() {
|
publish() {
|
||||||
if [ "$1" = 'generic' ]; then
|
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
|
// 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 {
|
try {
|
||||||
await File.WriteAllTextAsync(SharedInfo.LogFile, message).ConfigureAwait(false);
|
await File.WriteAllTextAsync(SharedInfo.LogFile, message).ConfigureAwait(false);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ test_script:
|
|||||||
$ProgressPreference = 'SilentlyContinue'
|
$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:
|
after_test:
|
||||||
- pwsh: >-
|
- pwsh: >-
|
||||||
Set-StrictMode -Version Latest
|
Set-StrictMode -Version Latest
|
||||||
|
|||||||
39
cc.sh
39
cc.sh
@@ -17,13 +17,19 @@ cd "$(dirname "$(readlink -f "$0")")"
|
|||||||
|
|
||||||
for ARG in "$@"; do
|
for ARG in "$@"; do
|
||||||
case "$ARG" in
|
case "$ARG" in
|
||||||
release|Release) CONFIGURATION="Release" ;;
|
|
||||||
debug|Debug) CONFIGURATION="Debug" ;;
|
debug|Debug) CONFIGURATION="Debug" ;;
|
||||||
|
release|Release) CONFIGURATION="Release" ;;
|
||||||
--clean) CLEAN=1 ;;
|
--clean) CLEAN=1 ;;
|
||||||
|
--no-clean) CLEAN=0 ;;
|
||||||
|
--link-during-publish) LINK_DURING_PUBLISH=1 ;;
|
||||||
--no-link-during-publish) LINK_DURING_PUBLISH=0 ;;
|
--no-link-during-publish) LINK_DURING_PUBLISH=0 ;;
|
||||||
|
--pull) PULL=1 ;;
|
||||||
--no-pull) PULL=0 ;;
|
--no-pull) PULL=0 ;;
|
||||||
|
--shared-compilation) SHARED_COMPILATION=1 ;;
|
||||||
--no-shared-compilation) SHARED_COMPILATION=0 ;;
|
--no-shared-compilation) SHARED_COMPILATION=0 ;;
|
||||||
|
--test) TEST=1 ;;
|
||||||
--no-test) TEST=0 ;;
|
--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
|
*) echo "Usage: $0 [--clean] [--no-link-during-publish] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"; exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -46,35 +52,26 @@ if [[ ! -f "$SOLUTION" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SETUP_FLAGS=(-c "$CONFIGURATION" -o "$OUT")
|
DOTNET_FLAGS=(-c "$CONFIGURATION" -o "$OUT" '/nologo')
|
||||||
BUILD_FLAGS=(--no-restore '/nologo')
|
|
||||||
|
|
||||||
if [[ "$LINK_DURING_PUBLISH" -eq 0 ]]; then
|
if [[ "$LINK_DURING_PUBLISH" -eq 0 ]]; then
|
||||||
BUILD_FLAGS+=('/p:LinkDuringPublish=false')
|
DOTNET_FLAGS+=('/p:LinkDuringPublish=false')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$SHARED_COMPILATION" -eq 0 ]]; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ "$TEST" -eq 1 ]]; then
|
if [[ "$TEST" -eq 1 ]]; then
|
||||||
if [[ "$CLEAN" -eq 1 ]]; then
|
dotnet test "$TESTS_PROJECT" "${DOTNET_FLAGS[@]}"
|
||||||
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[@]}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dotnet publish "$MAIN_PROJECT" "${DOTNET_FLAGS[@]}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Compilation finished successfully! :)"
|
echo "Compilation finished successfully! :)"
|
||||||
|
|||||||
Reference in New Issue
Block a user