This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
psakefile for building and running dotnet app in docker | |
Invoke like this: | |
Invoke-Psake -buildFile '.\psakefile.ps1' -taskList @($Task) -parameters @{ | |
dockerEnvFile = $DockerEnvFile | |
dockerTag = $DockerTag | |
containerName = $ContainerName | |
nugetUrl = $NugetUrl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Get JSON out put of SQL Stored Proc names and their parameters | |
#> | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory)] | |
[string] $serverInstance = '.', | |
[Parameter(Mandatory)] | |
[string] $database = 'test', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Class for passing into Edit-Object | |
#> | |
class EditObjectVisitor | |
{ | |
<# | |
Called by Edit-Object on each member. | |
$Obj the current object visited | |
$Member the current member visited | |
$Path the path to the current member, e.g. obj.array[2].propA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Helper for making dynamic parameters with ValidateSets in PowerShell | |
.PARAMETER ParameterName | |
Name of dynamic parameter | |
.PARAMETER MakeList | |
A scriptblock to create the ValidateSet list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Order of processing | |
1. Parameters from commandline are set | |
2. Properties block is run | |
3. Properties from command line then set | |
Use -parameters to add new values to the script you want to use in the properties block | |
Use -properties to override a value in properties block or add new value | |
$params = @{ | |
a = 'a from -parameters' | |
b = 'b from -parameters' |
NewerOlder