From af07f13ae20b3303d1d986ce6e35429f06b83f4c Mon Sep 17 00:00:00 2001 From: "Taylor Brazelton (from Dev Box)" Date: Wed, 6 Sep 2023 11:50:41 -0700 Subject: [PATCH] Github action for explort and deploy now ignores solutions with spaces in their friendly names. --- .github/workflows/auto-export-and-deploy.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-export-and-deploy.yml b/.github/workflows/auto-export-and-deploy.yml index 37ddc986..088ad5b3 100644 --- a/.github/workflows/auto-export-and-deploy.yml +++ b/.github/workflows/auto-export-and-deploy.yml @@ -62,8 +62,15 @@ jobs: $output = pac solution list echo $output $lines = $output -split "`n" - $versionLine = $lines | Where-Object { $_ -match "${{ github.event.inputs.solution_name }}" } - $version = ($versionLine -split "\s+")[3] + $headerLine = $lines[4] + $uniqueNameStart = $headerLine.IndexOf("Unique Name") + $friendlyNameStart = $headerLine.IndexOf("Friendly Name") + $versionStart = $headerLine.IndexOf("Version") + $managedStart = $headerLine.IndexOf("Managed") + $line = $lines | Where-Object { $_ -match "mpa_Kudos" } + $uniqueName = $line.Substring($uniqueNameStart, $friendlyNameStart - $uniqueNameStart).Trim() + $version = $line.Substring($versionStart, $managedStart - $versionStart).Trim() + $managed = $line.Substring($managedStart).Trim() echo "current_version=$version" | Out-File $env:GITHUB_OUTPUT -Append -Encoding utf8 # Split the version into its components $versionParts = $version.Split('.')