Permalink
Browse files

- added NuGet Build Scripts

- changed .gitignore to accept .nuspec files
- created build-nuget.ps1
- also published to NuGet
  • Loading branch information...
1 parent a61731b commit 759b317d3f72730e9a6c8721119678af33c62a30 @ericmbarnard ericmbarnard committed Jan 28, 2013
Showing with 54 additions and 1 deletion.
  1. +0 −1 .gitignore
  2. +25 −0 build/KoGrid.nuspec
  3. +29 −0 build/build-nuget.ps1
View
@@ -42,7 +42,6 @@ local.properties
*.sln.docstates
*.sln
*.nupkg
-*.nuspec
*.*roj
workbench/jquery*
workbench/bootstrap*
View
@@ -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>
View
@@ -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.