Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
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
StackExchange.Redis
Commits
cdf9d033
Commit
cdf9d033
authored
Jun 09, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -StartServers to build.ps1
This allows running VSTS builds in 1 step.
parent
a5517776
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
build.ps1
build.ps1
+10
-4
No files found.
build.ps1
View file @
cdf9d033
...
@@ -3,10 +3,11 @@ param(
...
@@ -3,10 +3,11 @@ param(
[
string
]
$Version
,
[
string
]
$Version
,
[
string
]
$BuildNumber
,
[
string
]
$BuildNumber
,
[
bool
]
$CreatePackages
,
[
bool
]
$CreatePackages
,
[
switch
]
$StartServers
,
[
bool
]
$RunTests
=
$true
,
[
bool
]
$RunTests
=
$true
,
[
string
]
$PullRequestNumber
[
string
]
$PullRequestNumber
)
)
function
CalculateVersion
()
{
function
CalculateVersion
()
{
if
(
$Version
)
{
if
(
$Version
)
{
return
$Version
return
$Version
...
@@ -65,6 +66,11 @@ if ($PullRequestNumber) {
...
@@ -65,6 +66,11 @@ if ($PullRequestNumber) {
}
}
if
(
$RunTests
)
{
if
(
$RunTests
)
{
if
(
$StartServers
)
{
Write-Host
"Starting all servers for testing:
$project
(all frameworks)"
-ForegroundColor
"Magenta"
& .\RedisConfigs\start-all.cmd
Write-Host
"Servers Started."
-ForegroundColor
"Green"
}
dotnet restore /ConsoleLoggerParameters:Verbosity
=
Quiet
dotnet restore /ConsoleLoggerParameters:Verbosity
=
Quiet
foreach
(
$project
in
$testsToRun
)
{
foreach
(
$project
in
$testsToRun
)
{
Write-Host
"Running tests:
$project
(all frameworks)"
-ForegroundColor
"Magenta"
Write-Host
"Running tests:
$project
(all frameworks)"
-ForegroundColor
"Magenta"
...
@@ -72,7 +78,7 @@ if ($RunTests) {
...
@@ -72,7 +78,7 @@ if ($RunTests) {
Push-Location
".\
$project
"
Push-Location
".\
$project
"
dotnet xunit -configuration Release
dotnet xunit -configuration Release
if
(
$LastExitCode
-ne 0
)
{
if
(
$LastExitCode
-ne 0
)
{
Write-Host
"Error with tests, aborting build."
-Foreground
"Red"
Write-Host
"Error with tests, aborting build."
-Foreground
"Red"
Pop-Location
Pop-Location
Exit
1
Exit
1
...
@@ -94,7 +100,7 @@ if ($CreatePackages) {
...
@@ -94,7 +100,7 @@ if ($CreatePackages) {
foreach
(
$project
in
$projectsToBuild
)
{
foreach
(
$project
in
$projectsToBuild
)
{
Write-Host
"Working on
$project
`:
"
-ForegroundColor
"Magenta"
Write-Host
"Working on
$project
`:
"
-ForegroundColor
"Magenta"
#Push-Location ".\src\$project"
#Push-Location ".\src\$project"
Push-Location
".\
$project
"
Push-Location
".\
$project
"
...
@@ -109,7 +115,7 @@ foreach ($project in $projectsToBuild) {
...
@@ -109,7 +115,7 @@ foreach ($project in $projectsToBuild) {
Write-Host
"
$project
... (Version:"
-NoNewline -ForegroundColor
"Magenta"
Write-Host
"
$project
... (Version:"
-NoNewline -ForegroundColor
"Magenta"
Write-Host
$semVer
-NoNewline -ForegroundColor
"Cyan"
Write-Host
$semVer
-NoNewline -ForegroundColor
"Cyan"
Write-Host
")"
-ForegroundColor
"Magenta"
Write-Host
")"
-ForegroundColor
"Magenta"
dotnet msbuild
"/t:
$targets
"
"/p:Configuration=Release"
"/p:Version=
$semVer
"
"/p:PackageOutputPath=
$packageOutputFolder
"
"/p:CI=true"
dotnet msbuild
"/t:
$targets
"
"/p:Configuration=Release"
"/p:Version=
$semVer
"
"/p:PackageOutputPath=
$packageOutputFolder
"
"/p:CI=true"
...
...
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