feat: support module_version for add-to-app releases#121
feat: support module_version for add-to-app releases#121eseidel wants to merge 1 commit intoshorebird/devfrom
Conversation
Design discussion: module_version vs release_version in the protocolThe current approach in this PR works by having the engine substitute
However, this means the host app's actual version is thrown away. The server has no way to distinguish a module version (git hash) from an app version, and can't report which host app versions are running a given module. Alternative: plumb module_version as a separate fieldInstead of overriding
The updater would then send both in the This requires touching more code:
But avoids future problems:
RecommendationThe current PR is a valid MVP, but we're leaning toward plumbing Leaving this here for discussion before we decide which path to take. |
c92ab93 to
b348f63
Compare
8e0003b to
fbecf6f
Compare
57f5ed5 to
b0de23a
Compare
Adds SHOREBIRD_MODULE_VERSION env var support to compileShorebirdYaml. When set, the value is written into the compiled shorebird.yaml as module_version, which the updater then sends to the server (alongside release_version) for add-to-app patch lookup. The shorebird CLI passes this env var through when running `flutter build aar` or `flutter build ios-framework` for module releases (see shorebirdtech/shorebird#3674).
b0de23a to
e4ce42c
Compare
Summary
SHOREBIRD_MODULE_VERSIONenv var incompileShorebirdYaml()and writemodule_versioninto the compiledshorebird.yaml(same pattern asSHOREBIRD_PUBLIC_KEY)module_versionfrom shorebird.yaml, add toUpdateConfigandPatchCheckRequestas a separate optional field sent alongsiderelease_versionContext
Part of shorebirdtech/shorebird#793
release_versionalways stays the host app's version.module_versionis a separate field used for patch lookup in add-to-app releases where the module's identity is independent of the host app.Companion PRs:
Test plan
module_versionappears in compiled yaml when env var is set