mirror of
https://github.com/gmeligio/flutter-docker-image.git
synced 2026-05-24 12:30:34 +00:00
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>
This commit is contained in:
+17
-15
@@ -36,25 +36,27 @@ output: {
|
||||
|
||||
commandTests: list.Concat([
|
||||
list.Take(input.commandTests, 1),
|
||||
[
|
||||
{
|
||||
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]
|
||||
}
|
||||
],
|
||||
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) > 0 {
|
||||
if len(input.fileContentTests) >= 1 {
|
||||
[{
|
||||
name: "Android SDK Command-line Tools is version \(android_cmdline_tools_version)"
|
||||
path: input.fileContentTests[0].path
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import "strings"
|
||||
import "list"
|
||||
|
||||
#Version3: {
|
||||
version!: =~ "^\\d+.\\d+.\\d+$"
|
||||
}
|
||||
|
||||
flutter: {
|
||||
channel!: "stable" | "beta"
|
||||
commit!: strings.MaxRunes(40)
|
||||
#Version3
|
||||
}
|
||||
@@ -5,35 +5,35 @@ import "list"
|
||||
version!: int
|
||||
}
|
||||
|
||||
#MinorVersion: {
|
||||
#SemverMinor: {
|
||||
version!: =~ "^\\d+.\\d+$"
|
||||
}
|
||||
|
||||
#PatchVersion: {
|
||||
#SemverPatch: {
|
||||
version!: =~ "^\\d+.\\d+.\\d+$"
|
||||
}
|
||||
|
||||
#FlutterVersion: {
|
||||
flutter: {
|
||||
channel!: "stable" | "beta"
|
||||
channel!: "stable"
|
||||
commit!: strings.MaxRunes(40)
|
||||
#PatchVersion
|
||||
#SemverPatch
|
||||
}
|
||||
}
|
||||
|
||||
#MinorOrPatchVersion: #MinorVersion | #PatchVersion
|
||||
#SemverVersion: #SemverMinor | #SemverPatch
|
||||
|
||||
#Version: {
|
||||
#FlutterVersion
|
||||
|
||||
android: {
|
||||
platforms!: [...#PlatformVersion] & list.MinItems(1) & list.UniqueItems
|
||||
gradle!: #MinorOrPatchVersion
|
||||
buildTools!: #PatchVersion
|
||||
cmdlineTools!: #MinorVersion
|
||||
ndk!: #PatchVersion
|
||||
cmake!: #PatchVersion
|
||||
gradle!: #SemverVersion
|
||||
buildTools!: #SemverPatch
|
||||
cmdlineTools!: #SemverMinor
|
||||
ndk!: #SemverPatch
|
||||
cmake!: #SemverPatch
|
||||
}
|
||||
|
||||
fastlane!: #PatchVersion
|
||||
fastlane!: #SemverPatch
|
||||
}
|
||||
Reference in New Issue
Block a user