Skip to content

Commit

Permalink
Merge pull request #37 from microsoft/users/ryanb58/ghaction-fix
Browse files Browse the repository at this point in the history
Github action for explort and deploy now ignores solutions with space…
  • Loading branch information
Ryanb58 committed Sep 6, 2023
2 parents 777b49d + af07f13 commit f71f131
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/auto-export-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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('.')
Expand Down

0 comments on commit f71f131

Please sign in to comment.