Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
5cefd76b
Commit
5cefd76b
authored
Jan 10, 2020
by
Savorboard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/dotnetcore/CAP
parents
13befe86
9ce812cf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
17 deletions
+21
-17
.travis.yml
.travis.yml
+2
-2
appveyor.yml
appveyor.yml
+1
-1
BuildScript.Version.cs
build/BuildScript.Version.cs
+6
-7
BuildScript.cs
build/BuildScript.cs
+10
-5
BuildScript.csproj
build/BuildScript.csproj
+1
-1
IDataStorage.SqlServer.cs
src/DotNetCore.CAP.SqlServer/IDataStorage.SqlServer.cs
+1
-1
No files found.
.travis.yml
View file @
5cefd76b
...
...
@@ -12,5 +12,5 @@ services:
script
:
-
export PATH="$PATH:$HOME/.dotnet/tools"
-
dotnet tool install --global FlubuCore.GlobalTool --version 4.3.5
-
flubu build tests -s=build/BuildScript.cs
\ No newline at end of file
-
dotnet tool install --global FlubuCore.GlobalTool --version 4.3.7
-
flubu build tests
\ No newline at end of file
appveyor.yml
View file @
5cefd76b
...
...
@@ -7,7 +7,7 @@ environment:
services
:
-
mysql
before_build
:
-
ps
:
dotnet tool install --global FlubuCore.GlobalTool --version 4.3.
5
-
ps
:
dotnet tool install --global FlubuCore.GlobalTool --version 4.3.
7
build_script
:
-
ps
:
flubu
test
:
off
...
...
build/BuildScript.Version.cs
View file @
5cefd76b
using
System
;
using
System.IO
;
using
System.Xml
;
using
FlubuCore.Context
;
using
FlubuCore.Scripting.Attributes
;
...
...
@@ -10,7 +11,7 @@ namespace BuildScript
{
public
BuildVersion
FetchBuildVersion
(
ITaskContext
context
)
{
var
content
=
System
.
IO
.
File
.
ReadAllText
(
"./build/version.props"
);
var
content
=
System
.
IO
.
File
.
ReadAllText
(
RootDirectory
.
CombineWith
(
"build/version.props"
)
);
XmlDocument
doc
=
new
XmlDocument
();
doc
.
LoadXml
(
content
);
...
...
@@ -28,22 +29,20 @@ namespace BuildScript
if
(!
context
.
BuildSystems
().
IsLocalBuild
)
{
isCi
=
true
;
//// todo use flubu build system when available.
var
appveyortag
=
context
.
GetEnvironmentVariable
(
"APPVEYOR_REPO_TAG"
);
bool
isTagAppveyor
=
!
string
.
IsNullOrEmpty
(
appveyortag
)
&&
appveyortag
.
Equals
(
"true"
,
StringComparison
.
OrdinalIgnoreCase
);
bool
isTagAppveyor
=
context
.
BuildSystems
().
AppVeyor
().
IsTag
;
if
(
(
context
.
BuildSystems
().
RunningOn
==
BuildSystemType
.
AppVeyor
&&
isTagAppveyor
)
||
(
context
.
BuildSystems
().
RunningOn
==
BuildSystemType
.
TravisCI
&&
string
.
IsNullOrWhiteSpace
(
context
.
BuildSystems
().
Travis
().
TagName
)
))
if
(
context
.
BuildSystems
().
RunningOn
==
BuildSystemType
.
AppVeyor
&&
isTagAppveyor
||
context
.
BuildSystems
().
RunningOn
==
BuildSystemType
.
TravisCI
&&
string
.
IsNullOrWhiteSpace
(
context
.
BuildSystems
().
Travis
().
TagName
))
{
isTagged
=
true
;
}
}
if
(!
isTagged
)
{
suffix
+=
(
isCi
?
"preview-"
:
"dv-"
)
+
CreateStamp
();
}
suffix
=
string
.
IsNullOrWhiteSpace
(
suffix
)
?
null
:
suffix
;
var
version
=
new
BuildVersion
(
int
.
Parse
(
versionMajor
),
int
.
Parse
(
versionMinor
),
int
.
Parse
(
versionPatch
),
versionQuality
);
...
...
build/BuildScript.cs
View file @
5cefd76b
...
...
@@ -9,7 +9,7 @@ namespace BuildScript
[
Include
(
"./build/BuildVersion.cs"
)]
public
partial
class
BuildScript
:
DefaultBuildScript
{
pr
ivate
const
string
ArtifactsDir
=
"./artifacts"
;
pr
otected
string
ArtifactsDir
=>
RootDirectory
.
CombineWith
(
"artifacts"
)
;
[
FromArg
(
"c|configuration"
)]
public
string
Configuration
{
get
;
set
;
}
...
...
@@ -29,27 +29,30 @@ namespace BuildScript
protected
override
void
BeforeBuildExecution
(
ITaskContext
context
)
{
BuildVersion
=
FetchBuildVersion
(
context
);
TestProjectFiles
=
context
.
GetFiles
(
"./test"
,
"*/*.csproj"
);
ProjectFiles
=
context
.
GetFiles
(
"./src"
,
"*/*.csproj"
);
TestProjectFiles
=
context
.
GetFiles
(
RootDirectory
.
CombineWith
(
"test"
)
,
"*/*.csproj"
);
ProjectFiles
=
context
.
GetFiles
(
RootDirectory
.
CombineWith
(
"src"
)
,
"*/*.csproj"
);
}
protected
override
void
ConfigureTargets
(
ITaskContext
context
)
{
var
clean
=
context
.
CreateTarget
(
"Clean"
)
.
SetDescription
(
""
)
.
SetDescription
(
"
Cleans the output of all projects in the solution.
"
)
.
AddCoreTask
(
x
=>
x
.
Clean
()
.
AddDirectoryToClean
(
ArtifactsDir
,
true
));
var
restore
=
context
.
CreateTarget
(
"Restore"
)
.
SetDescription
(
"Restores the dependencies and tools of all projects in the solution."
)
.
DependsOn
(
clean
)
.
AddCoreTask
(
x
=>
x
.
Restore
());
var
build
=
context
.
CreateTarget
(
"Build"
)
.
SetDescription
(
"Builds all projects in the solution."
)
.
DependsOn
(
restore
)
.
AddCoreTask
(
x
=>
x
.
Build
()
.
InformationalVersion
(
BuildVersion
.
VersionWithSuffix
()));
var
tests
=
context
.
CreateTarget
(
"Tests"
)
.
SetDescription
(
"Runs all Cap tests."
)
.
ForEach
(
TestProjectFiles
,
(
projectFile
,
target
)
=>
{
...
...
@@ -59,17 +62,19 @@ namespace BuildScript
});
var
pack
=
context
.
CreateTarget
(
"Pack"
)
.
SetDescription
(
"Creates nuget packages for Cap."
)
.
ForEach
(
ProjectFiles
,
(
projectFile
,
target
)
=>
{
target
.
AddCoreTask
(
x
=>
x
.
Pack
()
.
NoBuild
()
.
Project
(
projectFile
)
.
IncludeSymbols
()
.
When
(()
=>
!
string
.
IsNullOrEmpty
(
BuildVersion
.
Suffix
),
t
=>
t
.
VersionSufix
(
BuildVersion
.
Suffix
)
)
.
VersionSuffix
(
BuildVersion
.
Suffix
)
.
OutputDirectory
(
ArtifactsDir
));
});
context
.
CreateTarget
(
"Default"
)
.
SetDescription
(
"Runs all targets."
)
.
SetAsDefault
()
.
DependsOn
(
clean
,
restore
,
build
,
tests
,
pack
);
}
...
...
build/BuildScript.csproj
View file @
5cefd76b
...
...
@@ -9,7 +9,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FlubuCore" Version="4.3.
5
" />
<PackageReference Include="FlubuCore" Version="4.3.
7
" />
</ItemGroup>
</Project>
src/DotNetCore.CAP.SqlServer/IDataStorage.SqlServer.cs
View file @
5cefd76b
...
...
@@ -201,7 +201,7 @@ namespace DotNetCore.CAP.SqlServer
var
result
=
new
List
<
MediumMessage
>();
var
connection
=
new
SqlConnection
(
_options
.
Value
.
ConnectionString
);
using
var
connection
=
new
SqlConnection
(
_options
.
Value
.
ConnectionString
);
var
reader
=
await
connection
.
ExecuteReaderAsync
(
sql
);
while
(
reader
.
Read
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment