[x] PR title descriptive (can be used in release notes)
Description
Targets #2198
Updates version script to be callable by yarn run version (alongside original yarn scripts version)
Separates versioning for package.json and android build.gradle, using flags to specify (e.g. yarn run version --android)
Add android build version check using existing value from build.gradle
Adds support to existing version script to directly provide target version, e.g. yarn run version 1.0.5 --package --android, which will automatically populate android build and package.json version codes
Improves regex to ensure android versionCode and versionName are replaced even if string value appears instead of number (e.g. current *versionCode* placeholder text)
Improves version code generator to allow integer values if desired (e.g. yarn run version 2 -> code 2000000)
Review Notes
Can test variations of setting package.json and android build.gradle versions via
yarn run version [number] --android --package
all args after version are optional, prompting input if no version code set and can be applied to android, package or both
Untested in github actions (not sure the best way to trigger a deployment to call)
Git Issues
Closes #
Screenshots/Videos
Example - if version code not specified input prompted with validation (allows re-editing version)
Example - output if specifying number directly (with invalid code)
PR Checklist
Description
Targets #2198
yarn run version
(alongside originalyarn scripts version
)package.json
and androidbuild.gradle
, using flags to specify (e.g.yarn run version --android
)build.gradle
yarn run version 1.0.5 --package --android
, which will automatically populate android build and package.json version codes*versionCode*
placeholder text)yarn run version 2
-> code2000000
)Review Notes
Can test variations of setting package.json and android build.gradle versions via
all args after
version
are optional, prompting input if no version code set and can be applied to android, package or bothUntested in github actions (not sure the best way to trigger a deployment to call)
Git Issues
Closes #
Screenshots/Videos
Example - if version code not specified input prompted with validation (allows re-editing version)![image](https://github.com/IDEMSInternational/parenting-app-ui/assets/10515065/a985478e-64dc-4773-8278-7442f8eb0550)
Example - output if specifying number directly (with invalid code)![image](https://github.com/IDEMSInternational/parenting-app-ui/assets/10515065/7277986e-52e4-4b51-8a3b-42e5d98a8a7f)