Files
Eligio Mariño 40b632ca7f ci: update version.json from a single place (#375)
- Fixes a broken pipeline: the `single_update` branch had a
half-migrated step that pre-wrote `flutter_version.json` before the JS
comparator ran, causing every scheduled run to emit `result=false` and
skip all downstream jobs — meaning no update PRs were ever opened
- Replaces `script/updateFlutterVersion.js` with a single shell+jq step
that fetches `releases_linux.json`, reads the pinned version, compares,
and only writes when the upstream stable version actually changed
- Sources `android.buildTools.version` from Flutter's own
`engine/src/flutter/tools/android_sdk/packages.txt` at the new tag
(instead of being orphaned with no write path into `version.json`)
- Fixes `config/schema.cue` undefined reference (`#PatchVersion` →
`#SemverPatch`) that caused `cue vet` to fail
- Fixes `config/android.cue` length guard typo (`fileContentTests` →
`commandTests`)
- Fixes the PR creation step writing `commit_message` to `$GITHUB_ENV`
instead of `$GITHUB_OUTPUT`, which resulted in PRs with empty titles and
commit messages

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 15:35:48 +02:00

69 lines
1.6 KiB
CUE

package config
import "list"
#CommandTests: {
name: _
setup?: _
teardown?: _
command: _
args: _
expectedOutput?: [string]
excludedOutput?: _
}
#FileContentTests: {
name: string
path: _
expectedContents: [string]
}
#ContainerStructureTest: {
schemaVersion: _
commandTests: [...#CommandTests]
fileContentTests: [...#FileContentTests]
}
input: #ContainerStructureTest
android_cmdline_tools_test_expected_content: string @tag(android_cmdline_tools_test_expected_content)
android_cmdline_tools_version: string @tag(android_cmdline_tools_version)
android_ndk_version: string @tag(android_ndk_version)
android_sdk_build_tools_version: string @tag(android_sdk_build_tools_version)
output: {
schemaVersion: input.schemaVersion
commandTests: list.Concat([
list.Take(input.commandTests, 1),
if len(input.commandTests) >= 3 {
[
{
name: input.commandTests[1].name
command: input.commandTests[1].command
args: input.commandTests[1].args
expectedOutput: [android_sdk_build_tools_version]
},
{
name: input.commandTests[2].name
command: input.commandTests[2].command
args: input.commandTests[2].args
expectedOutput: [android_ndk_version]
}
]
},
list.Drop(input.commandTests, 3),
])
fileContentTests: list.Concat([
if len(input.fileContentTests) >= 1 {
[{
name: "Android SDK Command-line Tools is version \(android_cmdline_tools_version)"
path: input.fileContentTests[0].path
expectedContents: [android_cmdline_tools_test_expected_content]
}],
},
list.Drop(input.fileContentTests, 1),
])
}