feat: implement native-as-source version management #116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Descripton
Eliminates all hardcoded version numbers and establishes native platform configs as the single source of truth.
Changes
React Native App (
formulus)scripts/sync-version-to-package.js- Generatessrc/version.tsfrombuild.gradleFormulusMessageHandlers.ts- UsesAppVersionServiceinstead of hardcoded'0.1.0-native'FormulusInterfaceDefinition.ts- ManualFORMULUS_INTERFACE_VERSION(separate from app version)generate:versionruns onprebuild/prestartWeb Component (
formulus-formplayer)scripts/sync-version-from-parent.js- Syncs version from RN appFormulusInterfaceDefinition.ts- ManualFORMULUS_INTERFACE_VERSIONsync:versionruns onprebuild/prestartGenerated Files
Both projects now have auto-generated
src/version.ts:export const APP_VERSION = '1.0'; // From native configs## Workflow
Update app version:
android/app/build.gradle→versionName = "1.1.0"project.pbxproj→MARKETING_VERSION = 1.1.0Update interface version:
Manually bump
FORMULUS_INTERFACE_VERSIONin both interface definition files (only on breaking changes).Rule: App version comes from native configs. Generated
version.tsfiles propagate it. Interface version is manually maintained separately.Closes #115