Skip to content

Instantly share code, notes, and snippets.

View BrandynThornton's full-sized avatar

Brandyn Thornton BrandynThornton

View GitHub Profile
@BrandynThornton
BrandynThornton / helpers.ps1
Created December 16, 2016 06:07
A few Powershell functions that are helpful to have in psake build scripts. Some have .net in mind and assume a bin folder or NuGet package directory is desired.
function Find-PackagePath {
[CmdletBinding()]
param(
[Parameter(Position=0, Mandatory=1)]$packagesPath,
[Parameter(Position=1, Mandatory=1)]$packageName
)
return (Get-ChildItem ($packagesPath + "\" + $packageName + "*")).FullName | Sort-Object $_ | select -Last 1
}