mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Make ASF-ui build skippable
This commit is contained in:
parent
4d604a2d7c
commit
4dca323726
1 changed files with 20 additions and 15 deletions
35
cc.sh
35
cc.sh
|
@ -8,6 +8,7 @@ CONFIGURATION="Release"
|
||||||
OUT="out/source"
|
OUT="out/source"
|
||||||
TARGET_FRAMEWORK="netcoreapp2.2"
|
TARGET_FRAMEWORK="netcoreapp2.2"
|
||||||
|
|
||||||
|
ASF_UI=1
|
||||||
CLEAN=0
|
CLEAN=0
|
||||||
LINK_DURING_PUBLISH=1
|
LINK_DURING_PUBLISH=1
|
||||||
PULL=1
|
PULL=1
|
||||||
|
@ -20,6 +21,8 @@ for ARG in "$@"; do
|
||||||
case "$ARG" in
|
case "$ARG" in
|
||||||
debug|Debug) CONFIGURATION="Debug" ;;
|
debug|Debug) CONFIGURATION="Debug" ;;
|
||||||
release|Release) CONFIGURATION="Release" ;;
|
release|Release) CONFIGURATION="Release" ;;
|
||||||
|
--asf-ui) ASF_UI=1 ;;
|
||||||
|
--no-asf-ui) ASF_UI=0 ;;
|
||||||
--clean) CLEAN=1 ;;
|
--clean) CLEAN=1 ;;
|
||||||
--no-clean) CLEAN=0 ;;
|
--no-clean) CLEAN=0 ;;
|
||||||
--link-during-publish) LINK_DURING_PUBLISH=1 ;;
|
--link-during-publish) LINK_DURING_PUBLISH=1 ;;
|
||||||
|
@ -30,8 +33,8 @@ for ARG in "$@"; do
|
||||||
--no-shared-compilation) SHARED_COMPILATION=0 ;;
|
--no-shared-compilation) SHARED_COMPILATION=0 ;;
|
||||||
--test) TEST=1 ;;
|
--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 ;;
|
--help) echo "Usage: $0 [--clean] [--no-asf-ui] [--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-asf-ui] [--no-link-during-publish] [--no-pull] [--no-shared-compilation] [--no-test] [debug/release]"; exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -53,22 +56,24 @@ if [[ ! -f "$SOLUTION" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "ASF-ui/package.json" ]] && hash npm 2>/dev/null; then
|
if [[ "$ASF_UI" -eq 1 ]]; then
|
||||||
echo "Building ASF UI..."
|
if [[ -f "ASF-ui/package.json" ]] && hash npm 2>/dev/null; then
|
||||||
|
echo "Building ASF UI..."
|
||||||
|
|
||||||
# ASF-ui doesn't clean itself after old build
|
# ASF-ui doesn't clean itself after old build
|
||||||
rm -rf "ASF-ui/dist"
|
rm -rf "ASF-ui/dist"
|
||||||
|
|
||||||
cd ASF-ui
|
cd ASF-ui
|
||||||
npm i
|
npm i
|
||||||
git checkout -- package.json package-lock.json # Until we can switch to npm ci, avoid any changes to source files done by npm i
|
git checkout -- package.json package-lock.json # Until we can switch to npm ci, avoid any changes to source files done by npm i
|
||||||
npm run-script deploy
|
npm run-script deploy
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# ASF's output www folder needs cleaning as well
|
# ASF's output www folder needs cleaning as well
|
||||||
rm -rf "${MAIN_PROJECT}/${OUT}/www"
|
rm -rf "${MAIN_PROJECT}/${OUT}/www"
|
||||||
else
|
else
|
||||||
echo "WARNING: ASF UI dependencies are missing, skipping build of ASF UI..."
|
echo "WARNING: ASF UI dependencies are missing, skipping build of ASF UI..."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DOTNET_FLAGS=(-c "$CONFIGURATION" -f "$TARGET_FRAMEWORK" -o "$OUT" '/nologo')
|
DOTNET_FLAGS=(-c "$CONFIGURATION" -f "$TARGET_FRAMEWORK" -o "$OUT" '/nologo')
|
||||||
|
|
Loading…
Reference in a new issue