-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbundle.sh
More file actions
executable file
·42 lines (31 loc) · 1.04 KB
/
bundle.sh
File metadata and controls
executable file
·42 lines (31 loc) · 1.04 KB
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
35
36
37
38
39
40
41
#!/bin/sh
MVN_HOME=${MVN_HOME:-~/packages/apache-maven-3.8.3}
PATH=$PATH:${MVN_HOME}/bin
VERSION=0.1
PACKAGE_NAME=ldap-auth
BUILD_CLIENT=no
BUILD_SERVER=yes
PACKAGE_JAR=${PACKAGE_NAME}-${VERSION}.jar
CLIENT_JAR=${PACKAGE_NAME}-client.jar
SERVER_JAR=${PACKAGE_NAME}-server.jar
PACKAGE_ZIP="${PACKAGE_NAME}-${VERSION}.zip"
rm -f "target/${PACKAGE_ZIP}"
mvn package || ( echo "Build failed" && exit 1 )
status=$?
if [ "0" != "$status" ] ; then
exit
fi
jarsigner -keystore keystore.p12 -storetype PKCS12 -storepass changeit "target/${PACKAGE_JAR}" mirth-client-plugins
# Use a separate directory for ZIP assembly
rm -rf "${PACKAGE_NAME}"
mkdir -p "${PACKAGE_NAME}"
if [ "yes" == "${BUILD_SERVER}" ] ; then
cp -a "target/${PACKAGE_JAR}" "${PACKAGE_NAME}/${SERVER_JAR}"
fi
if [ "yes" == "${BUILD_CLIENT}" ] ; then
cp -a "target/${PACKAGE_JAR}" "${PACKAGE_NAME}/${CLIENT_JAR}"
fi
cp -a src/main/resources/plugin.xml "${PACKAGE_NAME}/plugin.xml"
cp -a README.md "${PACKAGE_NAME}"
zip -r9 "target/${PACKAGE_ZIP}" "${PACKAGE_NAME}"
rm -rf "${PACKAGE_NAME}"