Skip to content

Conversation

@najuna-brian
Copy link
Contributor

Descripton

Eliminates all hardcoded version numbers and establishes native platform configs as the single source of truth.

Changes

React Native App (formulus)

  • New: scripts/sync-version-to-package.js - Generates src/version.ts from build.gradle
  • Updated: FormulusMessageHandlers.ts - Uses AppVersionService instead of hardcoded '0.1.0-native'
  • Updated: FormulusInterfaceDefinition.ts - Manual FORMULUS_INTERFACE_VERSION (separate from app version)
  • Scripts: generate:version runs on prebuild/prestart

Web Component (formulus-formplayer)

  • New: scripts/sync-version-from-parent.js - Syncs version from RN app
  • Updated: FormulusInterfaceDefinition.ts - Manual FORMULUS_INTERFACE_VERSION
  • Scripts: sync:version runs on prebuild/prestart

Generated Files

Both projects now have auto-generated src/version.ts:
export const APP_VERSION = '1.0'; // From native configs## Workflow

Update app version:

  1. Update android/app/build.gradleversionName = "1.1.0"
  2. Update iOS project.pbxprojMARKETING_VERSION = 1.1.0
  3. Build/start auto-regenerates version files

Update interface version:
Manually bump FORMULUS_INTERFACE_VERSION in both interface definition files (only on breaking changes).

Rule: App version comes from native configs. Generated version.ts files propagate it. Interface version is manually maintained separately.

Closes #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Formulus & Formplayer] Remove Hardcoded Version Numbers

1 participant