Skip to content

Commit

Permalink
- added NuGet Build Scripts
Browse files Browse the repository at this point in the history
- changed .gitignore to accept .nuspec files
- created build-nuget.ps1
- also published to NuGet
  • Loading branch information
ericmbarnard committed Jan 28, 2013
1 parent a61731b commit 759b317
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ local.properties
*.sln.docstates
*.sln
*.nupkg
*.nuspec
*.*roj
workbench/jquery*
workbench/bootstrap*
Expand Down
25 changes: 25 additions & 0 deletions build/KoGrid.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Knockout.KoGrid</id>
<version>2.1.1</version>
<authors>timothyswt,ebarnard</authors>
<owners>timothyswt,ebarnard</owners>
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
<projectUrl>https://github.com/Knockout-Contrib/KoGrid</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A high-performance KnockoutJS DataGrid.
KoGrid was inspired by SlickGrid, and has been kept in sync with its sibling, ng-grid (a high-performance AngularJS DataGrid).</description>
<releaseNotes>Officially moved to Knockout-Contrib</releaseNotes>
<copyright>Copyright 2013</copyright>
<tags>knockoutjs javascript jquery datagrid ng-grid</tags>
<dependencies>
<dependency id="knockoutjs" version="2.0" />
<dependency id="jquery" version="1.6.3" />
</dependencies>
</metadata>
<files>
<file src="..\kogrid-*.js" target="content\Scripts" />
<file src="..\kogrid.css" target="content\Content" />
</files>
</package>
29 changes: 29 additions & 0 deletions build/build-nuget.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# NuGet Build and Publish Script
#==============================================================================
# Prerequisites:
# - Must be an owner of the NuGet Package
# - Must have "NuGet.exe" in your path
# - Must have latest "NuGet.exe" or self-updating enabled (which it should be)
# - Must have set your NuGet APIKey globally using:
# "nuget setApiKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# - Windows (hopefully that's obvious)
#==============================================================================

# Variables

$path = [System.IO.Path]
$cd = $(Get-Location).Path;
$output = $cd; # The "/Build" Folder
$nuspec = $path::Combine($cd, "KoGrid.nuspec");
$pkg = ""; # set after the build

# First, smoke any old Nuget Packages
Write-Host "Cleaning out old Nuget Packages..."
Get-ChildItem $output -include *.nupkg -recurse | foreach ($_) { Write-Host $_.Name; Remove-Item $_.FullName }

# Then, Build the NuGet Pkg
& nuget pack $nuspec -p Configuration=Release -o $output -verbosity "detailed"

# Now Publish the Pkg
$pkg = $(Get-ChildItem *.nupkg | Select-Object -First 1).FullName;
& nuget push $pkg -verbosity "detailed"

0 comments on commit 759b317

Please sign in to comment.