File tree Expand file tree Collapse file tree
.claude/skills/azure-functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# !/usr/bin/env pwsh
2+ # Requires -Version 5.1
3+
24<#
35. SYNOPSIS
46 Finds nuget.config by searching up the directory hierarchy.
Original file line number Diff line number Diff line change 11# !/usr/bin/env pwsh
2+ # Requires -Version 5.1
3+
24<#
35. SYNOPSIS
46 Sets Datadog instrumentation environment variables on an Azure Function App.
Original file line number Diff line number Diff line change 11# !/usr/bin/env pwsh
2+ # Requires -Version 5.1
3+
24<#
35. SYNOPSIS
46 Verifies Datadog instrumentation environment variables on an Azure Function App.
Original file line number Diff line number Diff line change 1+ # Requires -Version 5.1
2+
13<#
24. SYNOPSIS
35 Builds the Datadog.AzureFunctions NuGet package for local testing.
@@ -57,24 +59,6 @@ param(
5759)
5860
5961$ErrorActionPreference = ' Stop'
60-
61- # Verify PowerShell version (requires 5.1+ for Expand-Archive and modern cmdlets)
62- if ($PSVersionTable.PSVersion.Major -lt 5 -or
63- ($PSVersionTable.PSVersion.Major -eq 5 -and $PSVersionTable.PSVersion.Minor -lt 1 )) {
64- Write-Error @"
65- This script requires PowerShell 5.1 or higher.
66- Current version: $ ( $PSVersionTable.PSVersion )
67-
68- Install PowerShell 7+ (recommended for cross-platform support):
69- - Windows: winget install Microsoft.PowerShell
70- - macOS: brew install powershell/tap/powershell
71- - Linux: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux
72-
73- Or use PowerShell 5.1 (Windows only):
74- - Included with Windows 10/11 - run with: powershell.exe (not powershell.exe -Version 2)
75- "@
76- exit 1
77- }
7862$ProgressPreference = ' SilentlyContinue'
7963
8064# Set dotnet and nuke verbosity based on PowerShell verbose mode
Original file line number Diff line number Diff line change 1+ # Requires -Version 5.1
2+
13<#
24. SYNOPSIS
35 Deploys a .NET Azure Function app and optionally triggers it.
@@ -81,24 +83,6 @@ param(
8183Set-StrictMode - Version Latest
8284$ErrorActionPreference = ' Stop'
8385
84- # Verify PowerShell version (requires 5.1+ for modern cmdlets)
85- if ($PSVersionTable.PSVersion.Major -lt 5 -or
86- ($PSVersionTable.PSVersion.Major -eq 5 -and $PSVersionTable.PSVersion.Minor -lt 1 )) {
87- Write-Error @"
88- This script requires PowerShell 5.1 or higher.
89- Current version: $ ( $PSVersionTable.PSVersion )
90-
91- Install PowerShell 7+ (recommended for cross-platform support):
92- - Windows: winget install Microsoft.PowerShell
93- - macOS: brew install powershell/tap/powershell
94- - Linux: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux
95-
96- Or use PowerShell 5.1 (Windows only):
97- - Included with Windows 10/11 - run with: powershell.exe (not powershell.exe -Version 2)
98- "@
99- exit 1
100- }
101-
10286# Guard: Verify prerequisites
10387Write-Verbose " Verifying prerequisites..."
10488
Original file line number Diff line number Diff line change 1+ # Requires -Version 5.1
2+
13<#
24. SYNOPSIS
35 Downloads and analyzes Azure Function logs for Datadog tracer diagnostics.
@@ -84,24 +86,6 @@ param(
8486Set-StrictMode - Version Latest
8587$ErrorActionPreference = ' Stop'
8688
87- # Verify PowerShell version (requires 5.1+ for Expand-Archive and modern cmdlets)
88- if ($PSVersionTable.PSVersion.Major -lt 5 -or
89- ($PSVersionTable.PSVersion.Major -eq 5 -and $PSVersionTable.PSVersion.Minor -lt 1 )) {
90- Write-Error @"
91- This script requires PowerShell 5.1 or higher.
92- Current version: $ ( $PSVersionTable.PSVersion )
93-
94- Install PowerShell 7+ (recommended for cross-platform support):
95- - Windows: winget install Microsoft.PowerShell
96- - macOS: brew install powershell/tap/powershell
97- - Linux: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux
98-
99- Or use PowerShell 5.1 (Windows only):
100- - Included with Windows 10/11 - run with: powershell.exe (not powershell.exe -Version 2)
101- "@
102- exit 1
103- }
104-
10589# Apply -All switch
10690if ($All ) {
10791 $ShowVersion = $true
You can’t perform that action at this time.
0 commit comments