PharmaLedger-IMI / ctr-workspace

UC8 Clinical Trials Recruitment
MIT License
2 stars 0 forks source link

ctr-patient v0.10.3 does not build on Windows OS #79

Closed joaoluis-pdm closed 2 years ago

joaoluis-pdm commented 2 years ago

During the cd ctr-patient ; npm install the building process of lhforms v29.0.3 will break on windows with the error:

...
> lforms@29.0.3 build:clean C:\Users\IEUser\Documents\ctr-workspace\ctr-patient\lhforms
> rm -rf dist bower-dist app/generated .tmp

'rm' is not recognized as an internal or external command,
operable program or batch file.
...

This is part o the lforms build process, and we cannot change it.

Suggestion

  1. Remove the lhforms section from octopus, https://github.com/PharmaLedger-IMI/ctr-workspace/blob/df3c5cd75960b684cef856bb07b5932ee23f8803/ctr-patient/octopus.json#L3
    ...
    "dependencies": [
        {
            "name": "lhforms",
            "src": "https://github.com/lhncbc/lforms.git",
            "actions": [
                {
                    "type": "smartClone",
                    "target": ".",
                    "collectLog": false,
                    "commit": "720b18f35bfcef495d55e6b6ca8299162a0c8ad9",
                    "aComment": "hforms v29.0.3 - see also ctr-patient/octopus.json as this version number is used in the copy bundles"
                },
                {
                    "type": "execute",
                    "cmd": "cd lhforms && npm ci && npx bower install"
                },
                {
                    "type": "execute",
                    "cmd": "cd lhforms && npm run build"
                }
            ]
        },
    ...
  2. add a copy of the minifed build files to https://github.com/PharmaLedger-IMI/ctr-workspace/tree/master/ctr-patient/patient-ssapp/code/assets under a folder named "lforms" as in https://github.com/PharmaLedger-IMI/ctr-workspace/tree/v0.10.3/ctr-backoffice-frontend/src/assets/lforms-29.0.3
  3. remove the copy from https://github.com/PharmaLedger-IMI/ctr-workspace/blob/df3c5cd75960b684cef856bb07b5932ee23f8803/ctr-patient/patient-ssapp/octopus.json#L127
  4. update the top -freeze,json version
joaoluis-pdm commented 2 years ago

Done!