Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
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
Dapper
Commits
b1170c24
Commit
b1170c24
authored
May 01, 2020
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move build to traversal
parent
577d2f98
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
38 deletions
+16
-38
Build.csproj
Build.csproj
+5
-0
Dapper.Tests.Performance.csproj
Dapper.Tests.Performance/Dapper.Tests.Performance.csproj
+1
-0
build.ps1
build.ps1
+10
-38
No files found.
Build.csproj
0 → 100644
View file @
b1170c24
<Project Sdk="Microsoft.Build.Traversal/2.0.24">
<ItemGroup>
<ProjectReference Include="*\*.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
Dapper.Tests.Performance/Dapper.Tests.Performance.csproj
View file @
b1170c24
...
...
@@ -6,6 +6,7 @@
<OutputType>Exe</OutputType>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFrameworks>net462;netcoreapp3.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Dapper\Dapper.csproj" />
...
...
build.ps1
View file @
b1170c24
...
...
@@ -11,61 +11,33 @@ Write-Host " RunTests: $RunTests"
Write-Host
" dotnet --version:"
(
dotnet --version
)
$packageOutputFolder
=
"
$PSScriptRoot
\.nupkgs"
$projectsToBuild
=
'Dapper'
,
'Dapper.StrongName'
,
'Dapper.Contrib'
,
'Dapper.EntityFramework'
,
'Dapper.EntityFramework.StrongName'
,
'Dapper.Rainbow'
,
'Dapper.SqlBuilder'
$testsToRun
=
'Dapper.Tests'
,
'Dapper.Tests.Contrib'
if
(
$PullRequestNumber
)
{
Write-Host
"Building for a pull request (#
$PullRequestNumber
), skipping packaging."
-ForegroundColor Yellow
$CreatePackages
=
$false
}
Write-Host
"Restoring all projects..."
-ForegroundColor
"Magenta"
dotnet restore
Write-Host
"Done restoring."
-ForegroundColor
"Green"
Write-Host
"Building all projects..."
-ForegroundColor
"Magenta"
dotnet build -c Release --no-restore /p:CI
=
true
Write-Host
"Building all projects (Build.csproj traversal)..."
-ForegroundColor
"Magenta"
dotnet build
".\Build.csproj"
-c Release /p:CI
=
true
Write-Host
"Done building."
-ForegroundColor
"Green"
if
(
$RunTests
)
{
foreach
(
$project
in
$testsToRun
)
{
Write-Host
"Running tests:
$project
(all frameworks)"
-ForegroundColor
"Magenta"
Push-Location
".\
$project
"
dotnet
test
-c Release
if
(
$LastExitCode
-ne 0
)
{
Write-Host
"Error with tests, aborting build."
-Foreground
"Red"
Pop-Location
Exit
1
}
Write-Host
"Tests passed!"
-ForegroundColor
"Green"
Pop-Location
Write-Host
"Running tests: Build.csproj traversal (all frameworks)"
-ForegroundColor
"Magenta"
dotnet
test
".\Build.csproj"
-c Release --no-build --logger trx
if
(
$LastExitCode
-ne 0
)
{
Write-Host
"Error with tests, aborting build."
-Foreground
"Red"
Exit
1
}
Write-Host
"Tests passed!"
-ForegroundColor
"Green"
}
if
(
$CreatePackages
)
{
mkdir
-Force
$packageOutputFolder
| Out-Null
New-Item
-ItemType Directory -Path
$packageOutputFolder
-Force
| Out-Null
Write-Host
"Clearing existing
$packageOutputFolder
..."
-NoNewline
Get-ChildItem
$packageOutputFolder
|
Remove-Item
Write-Host
"done."
-ForegroundColor
"Green"
Write-Host
"Building all packages"
-ForegroundColor
"Green"
foreach
(
$project
in
$projectsToBuild
)
{
Write-Host
"Packing
$project
(dotnet pack)..."
-ForegroundColor
"Magenta"
dotnet pack
".\
$project
\
$project
.csproj"
--no-build -c Release /p:PackageOutputPath
=
$packageOutputFolder
/p:NoPackageAnalysis
=
true
/p:CI
=
true
Write-Host
""
}
dotnet pack
".\Build.csproj"
--no-build -c Release /p:PackageOutputPath
=
$packageOutputFolder
/p:CI
=
true
}
Write-Host
"Build Complete."
-ForegroundColor
"Green"
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