This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
Set-Location (Split-Path -Parent $PSScriptRoot)
|
||||
|
||||
if (-not (Get-Command go -ErrorAction SilentlyContinue)) {
|
||||
$cachedGo = Join-Path $env:LOCALAPPDATA 'ITWorx-Pulse\toolchains\go1.26.6\bin'
|
||||
if (-not (Test-Path (Join-Path $cachedGo 'go.exe'))) { throw 'Go 1.26.6 is not available on PATH or in the recorded local toolchain cache.' }
|
||||
$env:PATH = $cachedGo + ';' + $env:PATH
|
||||
}
|
||||
|
||||
$unformatted = gofmt -l cmd internal
|
||||
if ($unformatted) { throw "Go files need formatting: $($unformatted -join ', ')" }
|
||||
go vet ./...
|
||||
pnpm lint
|
||||
Reference in New Issue
Block a user