Skip to content

Commit

Permalink
Switch version suffix to be a build parameter
Browse files Browse the repository at this point in the history
Note: build.sh needs love from OS X/*nix later to match
  • Loading branch information
Nick Craver committed May 24, 2016
1 parent 41f1fe3 commit 3d4d251
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dapper.Contrib/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"authors": [ "Sam Saffron", "Johan Danforth" ],
"description": "The official collection of get, insert, update and delete helpers for dapper.net. Also handles lists of entities and optional \"dirty\" tracking of interface-based entities.",
"version": "1.50-rc2",
"version": "1.50-*",
"title": "Dapper.Contrib",
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Dapper.EntityFramework.StrongName/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"authors": [ "Marc Gravell", "Nick Craver" ],
"description": "Extension handlers for entity framework",
"version": "1.50-rc2",
"version": "1.50-*",
"title": "Dapper entity framework type handlers (with a strong name)",
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Dapper.EntityFramework/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"authors": [ "Marc Gravell", "Nick Craver" ],
"description": "Extension handlers for entity framework",
"version": "1.50-rc2",
"version": "1.50-*",
"title": "Dapper entity framework type handlers",
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Dapper.SqlBuilder/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"authors": [ "Sam Saffron, Johan Danforth" ],
"description": "The Dapper SqlBuilder component, for building SQL queries dynamically.",
"version": "1.50-rc2",
"version": "1.50-*",
"title": "Dapper SqlBuilder component",
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Dapper.StrongName/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"authors": [ "Sam Saffron", "Marc Gravell", "Nick Craver" ],
"description": "A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc..",
"version": "1.50-rc2",
"version": "1.50-*",
"title": "Dapper dot net (strong named)",
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions Dapper.Tests.Contrib/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
"Dapper": {
"version": "1.50-*",
"target": "project"
},
"Dapper.Contrib": {
"version": "1.50-*",
"target": "project"
},
"Dapper.SqlBuilder": {
"version": "1.50-*",
"target": "project"
}
},
Expand Down
1 change: 0 additions & 1 deletion Dapper.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"copyright": "2016 Stack Exchange, Inc.",
"dependencies": {
"Dapper": {
"version": "1.50-*",
"target": "project"
},
"Dapper.Contrib": {
Expand Down
2 changes: 1 addition & 1 deletion Dapper/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/StackExchange/dapper-dot-net"
}
},
"version": "1.50-rc2",
"version": "1.50-*",
"authors": [ "Sam Saffron", "Marc Gravell", "Nick Craver" ],
"description": "A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc..",
"title": "Dapper dot net",
Expand Down
23 changes: 16 additions & 7 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
param(
[parameter(Position=0)][string] $PreReleaseSuffix = ''
)
$solutionPath = split-path $MyInvocation.MyCommand.Definition
$getDotNet = join-path $solutionPath "tools\install.ps1"

Expand Down Expand Up @@ -39,20 +42,26 @@ if ($LASTEXITCODE -ne 0)

# Build all
dir "Dapper*" | where {$_.PsIsContainer} |
foreach {
& $dotnet build "$_"
foreach {
if ($PreReleaseSuffix) {
& $dotnet build "$_" --version-suffix "$PreReleaseSuffix"
} else {
& $dotnet build "$_"
}
}
# Run tests
dir "*.Tests*" | where {$_.PsIsContainer} |
foreach {
pushd "$_"
& $dotnet test
popd
& $dotnet test "$_"
}
# Package all
dir "Dapper*" | where {$_.PsIsContainer -and $_ -NotLike "*.Tests*" } |
foreach {
& $dotnet pack "$_" -c Release -o .\.nupkg\
foreach {
if ($PreReleaseSuffix) {
& $dotnet pack "$_" -c Release -o .\.nupkg\ --version-suffix "$PreReleaseSuffix"
} else {
& $dotnet pack "$_" -c Release -o .\.nupkg\
}
}

ls */*/project.json | foreach { echo $_.FullName} |
Expand Down

0 comments on commit 3d4d251

Please sign in to comment.