Closed 1yuv closed 8 months ago
Hi @kennsippell , I've added few more scenarios for unit test. The original inetnt of this issue was to fix the scenarios where valid CHT core versions like 4.5.0.xxxx were not being parsed properly and an error was being thrown.
Before this fix, if you were running upload-app-settings
against any CHT instance with 4.5.0, it'd fail because /api/deployinfo
returns version 4.5.0.6922454971
causing actualCoreVersion
to be falsy and crash when running semver.lt()
. semver.coerce would correctly parse 4.5.0.6922454971 to 4.5.0
and fix the problem.
Even after adding coerce, I added check on if actualCoreVersion
is undefined or not to stop it from failing.
const addNoolsBoilerplate = actualCoreVersion && semver.lt(actualCoreVersion, '4.2.0-dev');
However, if you think we should still crash the app and prevent users from running cht upload-app-settings
in non-standard versions, I can remove that undefined check.
If you're looking for previous isntances where CHT version was not a valid semver, you can see these on this (pvt) scraper output.
Oops, missed a colon again while merging, sending another PR to release @kennsippell , @jkuester
:tada: This PR is included in version 3.21.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Description
[description]
medic/cht-conf#596
Code review items
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.