Tool used to build and publish the eSaude Platform module bundle.
To change the version of a module, edit the modules.json
file.
Each module is defined by a JSON object of the form:
{
"name": "Module Name", // module name
"version": "1.2.3", // module version
"git": { /* git object, defined below */ },
"url": "https://domain.tld/filename.ext", // module download URL
"filename": "modulename-1.2.3.omod" // expected filename (used during validation)
}
Note: Only one of
git
orurl
are required, not both. If both are supplied, then the URL will be used to download the module and it will not be built from source.
The git
JSON object looks like:
{
"repo": "https://github.com/esaude/repo.git", // path to repo
"commit": "3dbbab2c4c0f3ce6173a18fe04175593b02b2f91", // commit hash [optional]
"path": "path/to/pom.xml", // path within repo to run maven [optional]
"tag": "version-1.0.0", // tag to build [optional]
"branch": "1.0.x" // branch to build [optional]
}
Note: Only the
repo
property is required. Only one ofcommit
ortag
should be supplied. If both are specified, thentag
will be used.
Once you've made your changes, test the build as described below.
💡 You need NodeJS v6.3.1
or greater to build the module bundle.
To test the build, you first need to install the NodeJS dependencies. Do this by executing the following command in the project root:
npm install
If you run into issues installing the dependencies, see the Troubleshooting section below.
To build the module bundle, run:
node bundler.js
This will download and/or build all the modules defined in modules.json
and
place them in the bundle
directory. It will also create a file called
esaude-platform-modules-x.y.z.zip
, which is the bundle.
Make sure all the expected modules are contained in the bundle.
Once you've tested your changes and pushed to GitHub, Travis will automatically build the bundle, but it will not publish a new version to Bintray. To publish to Bintray, you must create and push a tag to Github. This can be done by first creating the version as follows:
npm run create-version <OPTION>
where <OPTION>
can be major, minor, patch or a specific semver version (like 1.2.3). This command changes the version numbers is in the
package.json
and bintray.json
files (see docs) and creates a version commit.
Finally, publish the version by running:
npm run publish-version
📌 Once you've published a new module bundle version, you may also want to update the eSaude Platform Tomcat Docker file. See the eSaude EMR Platform release process documentation for more info.
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
If you see this error, it's because you need a more recent version of libstdc++
.
On Ubuntu, this can be installed as follows:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install libstdc++-4.9-dev
See the NodeGit README for more information.