build.ps1
[CmdletBinding(DefaultParameterSetName='Build')] param( [Parameter(Mandatory=$true,ParameterSetName='Clean')] [Switch] # Runs the build in clean mode, which removes any files, tools, packages created by previous builds. $Clean, [Parameter(Mandatory=$true,ParameterSetName='Initialize')] [Switch] # Initializes the repository. $Initialize ) #Requires -Version 4 Set-StrictMode -Version Latest & (Join-Path -Path $PSScriptRoot -ChildPath '.whiskey\Import-Whiskey.ps1' -Resolve) $configPath = Join-Path -Path $PSScriptRoot -ChildPath 'whiskey.yml' -Resolve $optionalArgs = @{ } if( $Clean ) { $optionalArgs['Clean'] = $true } if( $Initialize ) { $optionalArgs['Initialize'] = $true } $context = New-WhiskeyContext -Environment 'Dev' -ConfigurationPath $configPath Invoke-WhiskeyBuild -Context $context @optionalArgs |