From 51b544ce0602745d845d5af9ba6915ed684066e8 Mon Sep 17 00:00:00 2001
From: xjm <326308290@qq.com>
Date: Tue, 26 Jan 2021 16:35:16 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=84=E7=89=88=E6=9C=AC?=
=?UTF-8?q?=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4=E5=92=8C=E8=AF=AD=E8=A8=80?=
=?UTF-8?q?=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Directory.Build.props | 14 ++++++++
clear.bat | 12 +++++++
nuget-publish.bat | 33 +++++++++++++++++++
.../Sample.SqlServer/Sample.SqlServer.csproj | 1 +
src2x/ShardingCore.2x/ShardingCore.2x.csproj | 4 ++-
.../ShardingCore.MySql.2x.csproj | 4 ++-
.../ShardingCore.SqlServer.2x.csproj | 4 ++-
src3x/ShardingCore.3x/ShardingCore.3x.csproj | 4 ++-
.../ShardingCore.MySql.3x.csproj | 1 +
.../ShardingCore.SqlServer.3x.csproj | 4 ++-
.../ShardingCore.Test50.csproj | 5 +++
11 files changed, 81 insertions(+), 5 deletions(-)
create mode 100644 Directory.Build.props
create mode 100644 clear.bat
create mode 100644 nuget-publish.bat
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..8e84a139
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,14 @@
+
+
+
+
+ true
+ xuejmnet
+ https://github.com/xuejmnet/sharding-core
+ git
+ xuejm
+ 8.0
+ easy sharding for efcore 2.x 3.x 5.x lib.
+
+
+
\ No newline at end of file
diff --git a/clear.bat b/clear.bat
new file mode 100644
index 00000000..d79a7237
--- /dev/null
+++ b/clear.bat
@@ -0,0 +1,12 @@
+::删除所有bin与obj下的文件
+@echo off
+set nowpath=%cd%
+cd \
+cd %nowpath%
+::delete specify file(*.pdb,*.vshost.*)
+for /r %nowpath% %%i in (*.pdb,*.vshost.*) do (del %%i && echo delete %%i)
+
+::delete specify folder(obj,bin)
+for /r %nowpath% %%i in (obj,bin) do (IF EXIST %%i (RD /s /q %%i && echo delete %%i))
+
+pause
\ No newline at end of file
diff --git a/nuget-publish.bat b/nuget-publish.bat
new file mode 100644
index 00000000..f69f1d09
--- /dev/null
+++ b/nuget-publish.bat
@@ -0,0 +1,33 @@
+:start
+::定义版本
+set EFCORE2=2.0.0.1
+set EFCORE3=3.0.0.1
+set EFCORE5=5.0.0.1
+
+::删除所有bin与obj下的文件
+@echo off
+echo input nuget api key
+set /p apiKey=
+
+IF "apiKey"=="" (
+ ECHO No NuGet API key provided &goto :start
+)
+
+set nowpath=%cd%
+cd \
+cd %nowpath%
+::delete specify file(*.pdb,*.vshost.*)
+for /r %nowpath% %%i in (*.pdb,*.vshost.*) do (del %%i && echo delete %%i)
+
+::delete specify folder(obj,bin)
+for /r %nowpath% %%i in (obj,bin) do (IF EXIST %%i (RD /s /q %%i && echo delete %%i))
+
+echo 清理完成
+
+::构建
+dotnet build -c Release
+::推送
+for /r %nowpath% %%i in (*.nupkg) do (dotnet nuget push %%i -k %apiKey% --source https://api.nuget.org/v3/index.json)
+
+echo 完成
+pause
\ No newline at end of file
diff --git a/samples/Sample.SqlServer/Sample.SqlServer.csproj b/samples/Sample.SqlServer/Sample.SqlServer.csproj
index 79ae1bd9..b6fabc6c 100644
--- a/samples/Sample.SqlServer/Sample.SqlServer.csproj
+++ b/samples/Sample.SqlServer/Sample.SqlServer.csproj
@@ -2,6 +2,7 @@
net5.0
+ 9.0
diff --git a/src2x/ShardingCore.2x/ShardingCore.2x.csproj b/src2x/ShardingCore.2x/ShardingCore.2x.csproj
index 6b4f844b..74f0df2a 100644
--- a/src2x/ShardingCore.2x/ShardingCore.2x.csproj
+++ b/src2x/ShardingCore.2x/ShardingCore.2x.csproj
@@ -1,4 +1,4 @@
-
+
@@ -7,6 +7,8 @@
true
TRACE;DEBUG;EFCORE2;
8.0
+ ShardingCore
+ ShardingCore
diff --git a/src2x/ShardingCore.MySql.2x/ShardingCore.MySql.2x.csproj b/src2x/ShardingCore.MySql.2x/ShardingCore.MySql.2x.csproj
index 3f4d727a..84b30a13 100644
--- a/src2x/ShardingCore.MySql.2x/ShardingCore.MySql.2x.csproj
+++ b/src2x/ShardingCore.MySql.2x/ShardingCore.MySql.2x.csproj
@@ -1,4 +1,4 @@
-
+
netstandard2.0
@@ -6,6 +6,8 @@
true
TRACE;DEBUG;EFCORE2;
8.0
+ ShardingCore.MySql
+ ShardingCore.MySql
diff --git a/src2x/ShardingCore.SqlServer.2x/ShardingCore.SqlServer.2x.csproj b/src2x/ShardingCore.SqlServer.2x/ShardingCore.SqlServer.2x.csproj
index 109c23e5..42f4122f 100644
--- a/src2x/ShardingCore.SqlServer.2x/ShardingCore.SqlServer.2x.csproj
+++ b/src2x/ShardingCore.SqlServer.2x/ShardingCore.SqlServer.2x.csproj
@@ -1,4 +1,4 @@
-
+
@@ -7,6 +7,8 @@
true
TRACE;DEBUG;EFCORE2;
8.0
+ ShardingCore.SqlServer
+ ShardingCore.SqlServer
diff --git a/src3x/ShardingCore.3x/ShardingCore.3x.csproj b/src3x/ShardingCore.3x/ShardingCore.3x.csproj
index 73bf4919..66e8e173 100644
--- a/src3x/ShardingCore.3x/ShardingCore.3x.csproj
+++ b/src3x/ShardingCore.3x/ShardingCore.3x.csproj
@@ -1,4 +1,4 @@
-
+
@@ -7,6 +7,8 @@
true
TRACE;DEBUG;EFCORE3;
8.0
+ ShardingCore
+ ShardingCore
diff --git a/src3x/ShardingCore.MySql.3x/ShardingCore.MySql.3x.csproj b/src3x/ShardingCore.MySql.3x/ShardingCore.MySql.3x.csproj
index 375bf81a..466adfe7 100644
--- a/src3x/ShardingCore.MySql.3x/ShardingCore.MySql.3x.csproj
+++ b/src3x/ShardingCore.MySql.3x/ShardingCore.MySql.3x.csproj
@@ -6,6 +6,7 @@
true
TRACE;DEBUG;EFCORE3;
8.0
+ ShardingCore.MySql
diff --git a/src3x/ShardingCore.SqlServer.3x/ShardingCore.SqlServer.3x.csproj b/src3x/ShardingCore.SqlServer.3x/ShardingCore.SqlServer.3x.csproj
index b37775ee..645d3bb8 100644
--- a/src3x/ShardingCore.SqlServer.3x/ShardingCore.SqlServer.3x.csproj
+++ b/src3x/ShardingCore.SqlServer.3x/ShardingCore.SqlServer.3x.csproj
@@ -1,4 +1,4 @@
-
+
@@ -7,6 +7,8 @@
true
TRACE;DEBUG;EFCORE3;
8.0
+ ShardingCore.SqlServer
+ ShardingCore.SqlServer
diff --git a/test/ShardingCore.Test50/ShardingCore.Test50.csproj b/test/ShardingCore.Test50/ShardingCore.Test50.csproj
index ab583d31..1d54417d 100644
--- a/test/ShardingCore.Test50/ShardingCore.Test50.csproj
+++ b/test/ShardingCore.Test50/ShardingCore.Test50.csproj
@@ -2,6 +2,7 @@
net5.0
+ 9.0
@@ -9,6 +10,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+