Skip to content

Commit

Permalink
Change bccontainerhelper version telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstrup1 committed Aug 5, 2024
1 parent 90d56e2 commit 2348e94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Actions/TelemetryHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ function AddTelemetryEvent()
Add-TelemetryProperty -Hashtable $Data -Key 'PowerShellVersion' -Value ($PSVersionTable.PSVersion.ToString())

if ((Get-Module BcContainerHelper)) {
Add-TelemetryProperty -Hashtable $Data -Key 'BcContainerHelperVersion' -Value ((Get-Module BcContainerHelper).Version.ToString())
$module = Get-Module BcContainerHelper
if ($module) {
$versionNoFile = Join-Path -Path (Split-Path $module.Path -Parent) -ChildPath 'Version.txt'
Add-TelemetryProperty -Hashtable $Data -Key 'BcContainerHelperVersion' -Value (Get-Content -Path $versionNoFile -Encoding UTF8)
}
}

Add-TelemetryProperty -Hashtable $Data -Key 'WorkflowName' -Value $ENV:GITHUB_WORKFLOW
Expand Down

0 comments on commit 2348e94

Please sign in to comment.