Skip to content

Commit 87d4b89

Browse files
committed
添加linux的命令行发布脚本
1 parent 3d87e18 commit 87d4b89

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

TODO.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
2-
sudo bash nodesource_setup.sh
3-
sudo apt-get install nodejs
4-
npm rebuild node-sass --force
1+
curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
2+
sudo bash nodesource_setup.sh
3+
sudo apt-get install nodejs

publish_ubuntu.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
if [ ! -f "/usr/lib/gdiplus.dll" ]; then
4+
echo "ERROR:"
5+
echo "please install libgdiplus first:"
6+
echo "================================"
7+
echo "sudo apt-get install libgdiplus"
8+
echo "cd /usr/lib"
9+
echo "ln -s libgdiplus.so gdiplus.dll"
10+
echo "================================"
11+
exit
12+
fi
13+
14+
if [ ! -d "../ZKWeb/ZKWeb.Toolkits" ]; then
15+
echo "ERROR:"
16+
echo "please download ZKWeb and put it in the same directory as ZKWeb.MVVMDemo"
17+
exit
18+
fi
19+
20+
echo "building project..."
21+
cd src/ZKWeb.MVVMDemo.AspNetCore
22+
dotnet restore
23+
dotnet build -c Release -f netcoreapp1.1
24+
dotnet publish -c Release -f netcoreapp1.1 -r ubuntu.16.04-x64
25+
cd ../..
26+
27+
echo "building plugins..."
28+
cd src/ZKWeb.MVVMDemo.Console
29+
dotnet restore
30+
dotnet run -c Release -f netcoreapp1.1
31+
cd ../..
32+
33+
echo "publishing website..."
34+
cd ../ZKWeb/ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Cmd
35+
dotnet restore
36+
dotnet run -c Debug -f netcoreapp1.1 -- -f netcoreapp1.1 -x ".*node_modules.*" -r ../../../ZKWeb.MVVMDemo/src/ZKWeb.MVVMDemo.AspNetCore -n "zkweb.mvvm" -o "../../../publish"

0 commit comments

Comments
 (0)