Skip to content

Commit

Permalink
Merge branch 'pr/57'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbontyes committed Nov 4, 2024
2 parents 1ea3d8c + af6191e commit a0353ec
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 67 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
{
"coreVersion": "latest",
"frontendModules": {
"@ugandaemr/esm-data-visualizer-app": "latest",
"@openmrs/esm-cohort-builder-app": "latest",
"@openmrs/esm-home-app": "latest",
"@openmrs/esm-system-admin-app": "latest",
Expand Down Expand Up @@ -36,6 +38,8 @@
"@openmrs/esm-fast-data-entry-app": "latest",
"@openmrs/esm-implementer-tools-app": "latest",
"@openmrs/esm-form-builder-app": "latest",
"@openmrs/esm-billing-app": "next",
"@openmrs/esm-stock-management-app": "next",
"@openmrs/esm-user-onboarding-app": "next"

},
Expand Down
62 changes: 40 additions & 22 deletions distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.ozonehis</groupId>
<artifactId>maven-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-alpha.11</version>
<relativePath />
</parent>

Expand All @@ -20,7 +20,7 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<PatientIdentifierGeneratorVersion>0.1.0</PatientIdentifierGeneratorVersion>
<UVLReferenceapplicationDockerVersion>qa</UVLReferenceapplicationDockerVersion>
<UVLReferenceapplicationDockerVersion>3.2.0-rc.3</UVLReferenceapplicationDockerVersion>
<!-- Stock Management and Billing -->
<stockmanagement.version>2.0.2-SNAPSHOT</stockmanagement.version>
<billing.version>1.2.0-SNAPSHOT</billing.version>
Expand Down Expand Up @@ -79,24 +79,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<!-- Copy UVL reference-application-spa-assemble-config.json to frontend working directory -->
<id>Copy UVL reference-application-spa-assemble-config.json to local working directory</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/openmrs_frontend</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/configs/openmrs/frontend_assembly</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<!-- Override the Ozone files exclusion execution so to inherit all O3 Ref App files -->
<id>Exclude unneeded Ozone files</id>
Expand Down Expand Up @@ -193,7 +175,7 @@
</goals>
<configuration>
<target>
<echo message="Adding uvl frontend config"/>
<echo level="info" message="Adding uvl frontend config"/>
<replaceregexp file="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/.env"
match="ozone-frontend-config.json" replace="uvl-frontend-config.json" />
</target>
Expand All @@ -207,9 +189,45 @@
</goals>
<configuration>
<target>
<echo message="Adding uvl docker image version"/>
<echo level="info" message="Adding uvl docker image version"/>
<replaceregexp file="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/.env"
match="O3_DOCKER_IMAGE_TAG=.*" replace="O3_DOCKER_IMAGE_TAG=${UVLReferenceapplicationDockerVersion}" />
<replace file="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/docker-compose-openmrs.yml"
token="3.0.0-beta.21" value="${O3_DOCKER_IMAGE_TAG:-nightly}" />
</target>
</configuration>
</execution>
<execution>
<id>Add UVL addons to ozone</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo level="info" message="Adding UVL core version"/>
<replaceregexp file="${project.build.directory}/openmrs/frontend_assembly/build-openmrs-frontend.groovy"
match="openmrsVersion =.*" replace='openmrsVersion = slurper.parse(Paths.get("${project.build.directory}", "openmrs_frontend", "spa-assemble-config.json").toFile())["coreVersion"] ?: "next"'/>

<echo level="info" message="Adding UVL project Name to ozone" />
<replace
dir="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts"
token='-p ozone'>
<include name="**/*.sh"/>
<replacevalue>
-p $PROJECT_NAME
</replacevalue>
</replace>
<replace
file="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts/utils.sh"
token='export BOLD=`tput bold`'>
<replacevalue>
export BOLD=`tput bold`&#10;export PROJECT_NAME="${project.artifactId}"
</replacevalue>
</replace>

<echo level="info" message="Setting executable permissions for the Ozone start.sh script" />
<chmod file="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts/*.sh" perm="700"/>
</target>
</configuration>
</execution>
Expand Down
14 changes: 14 additions & 0 deletions sites/mugamba/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@
</target>
</configuration>
</execution>
<execution>
<id>Add UVL project name configuration</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo level="info" message="Adding Mugamba project Name to ozone" />
<replaceregexp file="${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts/utils.sh"
match="export PROJECT_NAME=.*" replace='export PROJECT_NAME="${project.artifactId}"' />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down

0 comments on commit a0353ec

Please sign in to comment.