Permalink
Browse files

Re-arranging the nuget packaging code

Bumping up the version to 1.0.5. 1.0.4 was a non nuget release that
can only be installed using PsGet

removed test package installer (sorry)

moved pester.bat into bin and removed runtests.bat. Figured that having
that code in the same file was easier to follow
  • Loading branch information...
1 parent f494f65 commit fea86eba0f61934089e1c3c91dba7020d95fb041 @scottmuc scottmuc committed May 6, 2012
Showing with 18 additions and 35 deletions.
  1. +1 −2 .gitignore
  2. +7 −8 {scripts → }/Pester.nuspec
  3. +3 −3 { → bin}/pester.bat
  4. +7 −0 package.ps1
  5. +0 −9 runtests.bat
  6. +0 −4 scripts/pack.ps1
  7. +0 −9 scripts/test.ps1
  8. BIN vendor/tools/NuGet.exe
View
@@ -1,2 +1 @@
-*~
-*.nupkg
+build/
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Pester</id>
- <version>$version$</version>
+ <version>1.0.5</version>
<title>Pester</title>
<description>A BDD style testing tool for Powershell</description>
<tags>powershell testing bdd</tags>
@@ -11,11 +11,10 @@
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
</metadata>
<files>
- <file src="test.ps1" target="tools" />
- <file src="..\*.*" target="tools" />
- <file src="..\*" target="tools" />
- <file src="..\Examples\**\*.*" target="tools\Examples" />
- <file src="..\Functions\**\*.*" target="tools\Functions" />
- <file src="..\ObjectAdaptations\**\*.*" target="tools\ObjectAdaptations" />
+ <file src="bin\*.*" target="tools\bin" />
+ <file src="Pester.psm1" target="tools" />
+ <file src="Examples\**\*.*" target="tools\Examples" />
+ <file src="Functions\**\*.*" target="tools\Functions" />
+ <file src="ObjectAdaptations\**\*.*" target="tools\ObjectAdaptations" />
</files>
-</package>
+</package>
@@ -8,12 +8,12 @@ if '%1'=='/help' goto usage
if '%1'=='help' goto usage
if '%1'=='new-fixture' goto newfixture
-call "%DIR%runtests.bat"
+@PowerShell -NonInteractive -NoProfile -ExecutionPolicy unrestricted -Command "& Import-Module '%DIR%..\Pester.psm1'; & { Invoke-Pester -EnableExit; exit $LastExitCode}"
goto finish
:newfixture
SHIFT
-@PowerShell -NonInteractive -NoProfile -ExecutionPolicy unrestricted -Command Import-Module '%DIR%Pester.psm1'; New-Fixture %*
+@PowerShell -NonInteractive -NoProfile -ExecutionPolicy unrestricted -Command Import-Module '%DIR%..\Pester.psm1'; New-Fixture %*
goto finish
:usage
@@ -24,4 +24,4 @@ echo Example: pester new-fixture [-Path relativePath] -Name nameOfTestFile
:finish
-exit /B %errorlevel%
+exit /B %errorlevel%
View
@@ -0,0 +1,7 @@
+
+if (Test-Path "build") {
+ Remove-Item "build" -Recurse -Force
+}
+
+mkdir build
+vendor\tools\nuget pack Pester.nuspec -OutputDirectory build
View
@@ -1,9 +0,0 @@
-@echo off
-SET DIR=%~dp0%
-@echo on
-
-::@PowerShell Set-ExecutionPolicy RemoteSigned
-@PowerShell -NonInteractive -NoProfile -ExecutionPolicy unrestricted -Command "& Import-Module '%DIR%Pester.psm1'; & { Invoke-Pester -EnableExit; exit $LastExitCode}"
-
-@echo off
-exit /B %errorlevel%
View
@@ -1,4 +0,0 @@
-$commitCount = (git log --oneline).count
-$version = "1.0.4.$commitCount"
-nuget pack Pester.nuspec -version $version
-cp *.nupkg C:\NuGetPackages
View
@@ -1,9 +0,0 @@
-nuget install pester -o packages
-$path = Resolve-Path .
-$pesterPackage = gci "$path\packages\Pester.*"
-if ($pesterPackage.count) {
- $pesterPackage = $pesterPackage[$pesterPackage.count-1]
-}
-$pesterPackagePath = $pesterPackage.FullName
-Import-Module "$pesterPackagePath\tools\Pester.psm1"
-Invoke-Pester "$path\src"
View
Binary file not shown.

0 comments on commit fea86eb

Please sign in to comment.