-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
34 lines (29 loc) · 1 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Clean up previous build artifacts
echo "Cleaning up previous build artifacts ..."
rm -rf openmrs-config-kenyaemr
rm -rf spa
# Build assets
echo "Building Kenya EMR 3.x assets ..."
CWD=$(pwd)
npx --legacy-peer-deps openmrs@next build \
--build-config ./configuration/spa-build-config.json \
--target ./spa \
--page-title "KenyaEMR" \
--support-offline false
# Assemble assets
echo "Assembling assets ..."
npx --legacy-peer-deps openmrs@next assemble \
--manifest \
--mode config \
--config ./configuration/spa-build-config.json \
--target ./frontend
# Copy required files
echo "Copying required files ..."
git clone https://github.com/palladiumkenya/openmrs-config-kenyaemr.git
cp "${CWD}/openmrs-config-kenyaemr/assets/kenyaemr-login-logo.png" "${CWD}/spa"
cp "${CWD}/openmrs-config-kenyaemr/assets/kenyaemr-primary-logo.png" "${CWD}/spa"
cp "${CWD}/openmrs-config-kenyaemr/assets/favicon.ico" "${CWD}/spa"
cp "${CWD}/configuration/config.json" "${CWD}/spa"
# Exit with success status
exit 0