Commit 5d13af5
authored
Fix failing "Update BC Artifact Version" job when BCPlatform is untracked (#9022)
The scheduled `[releases/26.4] Update BC Artifact Version` job fails
because the `UpdatePlatformVersion` automation calls
`Update-PackageVersion -PackageName "BCPlatform"`, which throws `Package
BCPlatform not found in Packages config`. Release branches like
`releases/26.4` don't track a `BCPlatform` entry in
`build/Packages.json`, so the automation errors and fails the whole job.
### Changes
- **`.github/actions/RunAutomation/UpdatePlatformVersion/run.ps1`**:
guard `Update-PackageVersion` with an existence check on the
`BCPlatform` package. When it's absent, log and return "No update
available" instead of throwing. Behavior is unchanged on branches that
track the package.
```powershell
$platformPackage = Get-ConfigValue -Key "BCPlatform" -ConfigType Packages
if (-not $platformPackage) {
Write-Host "BCPlatform package is not present in the Packages config. Skipping update."
return $result
}
$newVersion = Update-PackageVersion -PackageName "BCPlatform"
```
[AB#612711](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/612711)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent d7e1723 commit 5d13af5
1 file changed
Lines changed: 10 additions & 2 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
0 commit comments