Skip to content

Commit

Permalink
Update bindings-check
Browse files Browse the repository at this point in the history
  • Loading branch information
albertwoo committed Oct 21, 2024
1 parent 18a0b54 commit fef1269
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,17 +308,18 @@ pipeline "bindings-check" {
collapseGithubActionLogs
stage "check" {
run (fun _ -> task {
let errors = Collections.Generic.List<string>()
let mutable hasErrors = false

for info in getBindingInfos () do
printfn $"Check for {info.package}, current version: {info.version}"
let! nugetVersion = getNugetPackageLatestVersion info.package
let latestVersion = nugetVersion.OriginalVersion
if latestVersion <> info.version then
errors.Add $"Package {info.package} should be updated from {info.version} to {latestVersion}"
hasErrors <- true
printfn $"::error::Package {info.package} should be updated from {info.version} to {latestVersion}"

if errors.Count > 0 then
raise (PipelineFailedException("Errors: " + String.concat "\n" errors))
if hasErrors then
raise (PipelineFailedException("Some packages' version changed"))
})
}
runIfOnlySpecified
Expand Down

0 comments on commit fef1269

Please sign in to comment.