Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit fea86eba0f61934089e1c3c91dba7020d95fb041 1 parent f494f65
@scottmuc scottmuc authored
View
3  .gitignore
@@ -1,2 +1 @@
-*~
-*.nupkg
+build/
View
15 scripts/Pester.nuspec → Pester.nuspec
@@ -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>
View
6 pester.bat → bin/pester.bat
@@ -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
7 package.ps1
@@ -0,0 +1,7 @@
+
+if (Test-Path "build") {
+ Remove-Item "build" -Recurse -Force
+}
+
+mkdir build
+vendor\tools\nuget pack Pester.nuspec -OutputDirectory build
View
9 runtests.bat
@@ -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
4 scripts/pack.ps1
@@ -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
9 scripts/test.ps1
@@ -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
BIN  vendor/tools/NuGet.exe
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.