update build script to allow building only static assets
This commit is contained in:
parent
f7cdcbb33a
commit
88727d1e4a
14
build
14
build
@ -4,16 +4,26 @@ if [ ! -d output ]; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" != "--assets-only" ]; then
|
||||||
|
|
||||||
dotnet build
|
dotnet build
|
||||||
|
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
|
echo -n ".NET build failed. Continue with asset build? (Y/N) [Y]: "
|
||||||
|
read ans
|
||||||
|
if [ "$ans" != "Y" && "$ans" != "y" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
ASSET_UIHTML_VERSION=2024.27.5
|
ASSET_UIHTML_VERSION=2024.27.5
|
||||||
|
|
||||||
THEME_NAME=avondale
|
THEME_NAME=avondale
|
||||||
|
|
||||||
for each in mocha-dotnet/src/assets/ui-html/css/common/*.less mocha-dotnet/src/assets/ui-html/css/$THEME_NAME/*.less; do
|
for each in mocha-dotnet/src/assets/ui-html/css/common/*.less mocha-dotnet/src/assets/ui-html/css/$THEME_NAME/*.less; do
|
||||||
|
>&2 echo $each
|
||||||
cat $each
|
cat $each
|
||||||
echo ""
|
echo ""
|
||||||
done | lessc --plugin=less-plugin-clean-css=advanced - output/assets/ui-html/$ASSET_UIHTML_VERSION/css/mochaApp.css
|
done | lessc --plugin=less-plugin-clean-css=advanced - output/assets/ui-html/$ASSET_UIHTML_VERSION/css/mochaApp.css
|
||||||
@ -23,10 +33,13 @@ if [ ! -d output/assets/ui-html/$ASSET_UIHTML_VERSION/base ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for each in mocha-dotnet/src/assets/ui-html/base/*.js mocha-dotnet/src/assets/ui-html/base/controls/*.js mocha-dotnet/src/assets/ui-html/mocha/*.js mocha-dotnet/src/assets/ui-html/mocha/controls/*.js; do
|
for each in mocha-dotnet/src/assets/ui-html/base/*.js mocha-dotnet/src/assets/ui-html/base/controls/*.js mocha-dotnet/src/assets/ui-html/mocha/*.js mocha-dotnet/src/assets/ui-html/mocha/controls/*.js; do
|
||||||
|
>&2 echo $each
|
||||||
cat $each
|
cat $each
|
||||||
echo ""
|
echo ""
|
||||||
done | jsmin > output/assets/ui-html/$ASSET_UIHTML_VERSION/base/shared-min.js
|
done | jsmin > output/assets/ui-html/$ASSET_UIHTML_VERSION/base/shared-min.js
|
||||||
|
|
||||||
|
if [ "$1" != "--assets-only" ]; then
|
||||||
|
|
||||||
cp mocha-dotnet/src/app/Mocha.ServerApplication/bin/Debug/net8.0/* output/
|
cp mocha-dotnet/src/app/Mocha.ServerApplication/bin/Debug/net8.0/* output/
|
||||||
|
|
||||||
if [ ! -d output/plugins ]; then
|
if [ ! -d output/plugins ]; then
|
||||||
@ -40,5 +53,6 @@ for each in mocha-dotnet/src/plugins/*; do
|
|||||||
|
|
||||||
cp $each/bin/Debug/net8.0/*.dll output/plugins
|
cp $each/bin/Debug/net8.0/*.dll output/plugins
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user