Permalink
Browse files

adding nuget and chocolatey love to psake

  • Loading branch information...
1 parent ec6715f commit d1b98201ea7072ed142f759685a9b8d660b95261 @ferventcoder ferventcoder committed Apr 22, 2011
Showing with 70 additions and 0 deletions.
  1. +27 −0 NuGetPackageBuilder.cmd
  2. +19 −0 nuget/psake.nuspec
  3. +14 −0 nuget/tools/chocolateyInstall.ps1
  4. +10 −0 nuget/tools/init.ps1
@@ -0,0 +1,27 @@
+@echo on
+
+:: Assumes robocopy and nuget.exe both on the path
+
+SET DIR=%~dp0%
+SET DESTDIR=%DIR%bin
+
+IF EXIST %DESTDIR% goto deletebin
+
+goto prepare
+
+:deletebin
+rmdir /s /q %DESTDIR%
+if %ERRORLEVEL% NEQ 0 goto errors
+
+:prepare
+robocopy %DIR% %DESTDIR%\tools /E /B /NP /R:0 /W:0 /NJH /NJS /NS /NFL /NDL /XF ".git*" "Nuget*" "*.nupkg" /XD "%DIR%nuget" "%DIR%.git" "%DIR%bin"
+robocopy %DIR%nuget %DESTDIR% /E /B /NP /R:0 /W:0 /NJH /NJS /NS /NFL /NDL
+
+:build
+nuget pack %DESTDIR%\psake.nuspec
+if %ERRORLEVEL% NEQ 0 goto errors
+
+goto :eof
+
+:errors
+EXIT /B %ERRORLEVEL%
View
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <metadata>
+ <id>psake</id>
+ <version>4.0.0.0</version>
+ <authors>James Kovacs</authors>
+ <owners>Damian Hickey, Rob Reynolds</owners>
+ <projectUrl>https://github.com/JamesKovacs/psake</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <summary>PSake is a build automation tool written in PowerShell</summary>
+ <description>psake is a build automation tool written in PowerShell. It avoids the angle-bracket tax associated with executable XML by leveraging the PowerShell syntax in your build scripts. psake has a syntax inspired by rake (aka make in Ruby) and bake (aka make in Boo), but is easier to script because it leverages your existent command-line knowledge.
+
+psake is pronounced sake – as in Japanese rice wine. It does NOT rhyme with make, bake, or rake. |
+You can also install with chocolatey (http://nuget.org/List/Packages/chocolatey) and have global psake.
+ </description>
+ <language>en-US</language>
+ <tags>build powershell chocolatey</tags>
+ </metadata>
+</package>
@@ -0,0 +1,14 @@
+$nugetPath = 'C:\NuGet'
+$nugetExePath = Join-Path $nuGetPath 'bin'
+$packageBatchFileName = Join-Path $nugetExePath "psake.bat"
+
+$psakeDir = (Split-Path -parent $MyInvocation.MyCommand.Definition)
+#$path = ($psakeDir | Split-Path | Join-Path -ChildPath 'psake.cmd')
+$path = Join-Path $psakeDir 'psake.cmd'
+Write-Host "Adding $packageBatchFileName and pointing to $path"
+"@echo off
+""$path"" %*" | Out-File $packageBatchFileName -encoding ASCII
+
+
+write-host "PSake is now ready. You can type 'psake' from any command line at any path. Get started by typing 'psake /?'"
+Start-Sleep 10
View
@@ -0,0 +1,10 @@
+param($installPath, $toolsPath, $package)
+
+$psakeModule = Join-Path $toolsPath psake.psm1
+import-module $psakeModule
+
+@"
+========================
+PSake - Automated builds with powershell
+========================
+"@ | Write-Host

0 comments on commit d1b9820

Please sign in to comment.