I’m pleased to announce the 3.1.1 release of OpenMRS SDK! Once again thanks to Soldevelo for making it happen! @adamg, @gutkowski, @tmarzeion worked hard to implement the following features:
Building and deploying all watched modules with one command: mvn openmrs-sdk:build
Pulling changes for all watched modules: mvn openmrs-sdk:pull
Forking and cloning any repo: mvn openmrs-sdk:clone
Creating and updating pull requests with automated pulling of latest changes and squashing: mvn openmrs-sdk:pr
Improving module creation wizards
Adding support for running database docker containers before starting up a server
Releasing to bintray: mvn openmrs-sdk:release (currently only maven jars, but shortly will release omod as well)
Adding anonymous usage statistics (you can opt-out).
Building Open Web Apps with mvn openmrs-sdk:build
and more smaller fixes and improvements…
The update is being slowly rolled out to anyone using SDK, but you can always upgrade right away with:
I’m reaching out to you as I’m curious if the way we implemented build and pull commands for watched projects is a good enough replacement for your custom shell scripts.
Once you create a server, you can call
mvn openmrs-sdk:watch -DserverId=myserver
in any number of modules’ directories you are currently working on.
and you will have all watched modules updated to the latest upstream master and deployed to the server.
The pull command stashes uncommitted changes, does pull rebase on the currently checked out branch and pops stash back. If there are conflicts it reverts to the original state and asks you to pull changes for that module manually.
We also have a complimentary feature, which is capable of deploying the latest SNAPSHOTs built by CI (you don’t have to have any repositories cloned) by calling:
mvn openmrs-sdk:deploy -DserverId=myserver
It makes only sense if you setup a server pointing to a SNAPSHOT version of a distro, which has SNAPSHOT versions of modules, e.g. Reference Application 2.5-SNAPSHOT:
@raff I have an openmrs-distro.properties file where I updated the version number of a module, in this case for Ref App 2.5-SNAPSHOT I increased metadata deploy to 1.7 from 1.5. How can pull the latest version of the new module into the directory.
mvn openmrs-sdk:deploy -DserverId=myserver does not seem to do this
@ssmusoke, if you want to deploy updated versions to a server from a locally updated openmrs-distro.properties file, then you just need to run the deploy command from the directory with openmrs-distro.properties file or point to that file:
@ssmusoke, that’s a bug… I noticed it asked me to confirm the update, but it didn’t update the omod eventually. @adamg, could you please have a look at it?
Hi @ssmusoke,
I believe you’ve updated the openmrs-distro.properties file in your server’s directory ?
This won’t work, because we use this file to calculate difference between the file in directory passed via -Ddistro and the one in server’s directory(In your case it was the same file). After that the openmrs-distro.properties is updated.
So I wouldn’t call it a bug, we just didn’t consider this use case. We can of course change current logic to support this.
What do you think @raff ? ?
@adamg That is what I did since the distro has a lower version of the module than what I need, and hence failed to start. Otherwise the question is how can I use higher versions of the modules that are defined in the distro.
First thing you need to restore your orginal openmrs-distro.properties file. Then copy it out to any other directory and change modules versions. After that you can call deploy from this directory.
Alternately if you just want to update a module for yourself, you can call deploy and select a module you want to update.
@adamg, good finding! I think it would be good to drop all modules specified in the distro and copy them again to the server when calling deploy distro. Just to be sure the versions of omods are in sync. Could you please ticket it?
No, properties file has to contain all the modules.
Yes, new modules will be deployed and added to the server’s distro properties file
@raff We have an idea with @gutkowski how to support updating modules as @ssmusoke was trying to do by editing distro properties file in server’s directory. I will create ticket, so you can approve it or not
@adamg won’t having only those modules that change make the process more efficient for managing updates especially as the number of modules grows across distributions?