Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

allow to create pre-release nuget packages #30

Open
wants to merge 1 commit into from

1 participant

@StasPerekrestov

usage:
Build.RunTask.bat NuGetPack 1.5.1 rc1

@StasPerekrestov StasPerekrestov allow to create pre-release nuget packages
usage:
Build.RunTask.bat NuGetPack 1.5.1 rc1
5a59bc2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 2, 2013
  1. @StasPerekrestov

    allow to create pre-release nuget packages

    StasPerekrestov authored
    usage:
    Build.RunTask.bat NuGetPack 1.5.1 rc1
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 3 deletions.
  1. +3 −2 build/Build.RunTask.ps1
  2. +6 −1 build/default.ps1
View
5 build/Build.RunTask.ps1
@@ -1,6 +1,7 @@
Param(
[string]$task,
- [string]$version = "0.0.0.0")
+ [string]$version = "0.0.0.0",
+ [string]$prerelease = $null)
if($task -eq $null) {
$task = read-host "Enter Task"
@@ -8,4 +9,4 @@ if($task -eq $null) {
$scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.path)
-. .\build\psake.ps1 -scriptPath $scriptPath -t $task -properties @{ version=$version }
+. .\build\psake.ps1 -scriptPath $scriptPath -t $task -properties @{ version=$version; prerelease=$prerelease}
View
7 build/default.ps1
@@ -14,6 +14,7 @@ properties {
$ilMergeModule.ilMergePath = "$base_directory\bin\ilmerge-bin\ILMerge.exe"
$nuget_dir = "$src_directory\.nuget"
+ $prerelease = $null
}
task default -depends Build
@@ -59,5 +60,9 @@ task Clean {
}
task NuGetPack -depends Package {
- gci -r -i *.nuspec "$nuget_dir" |% { .$nuget_dir\nuget.exe pack $_ -basepath $base_directory -o $publish_directory -version $version }
+ $pkgVersion = $version
+ if($prerelease) {
+ $pkgVersion = "$pkgVersion-$prerelease"
+ }
+ gci -r -i *.nuspec "$nuget_dir" |% { .$nuget_dir\nuget.exe pack $_ -basepath $base_directory -o $publish_directory -version $pkgVersion }
}
Something went wrong with that request. Please try again.