Skip to content

Commit 5567d3b

Browse files
committed
fix(build): Fix JSPs to include unicodetools and cldr
Fixes #271
1 parent c837a61 commit 5567d3b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/push-jsp-on-tag.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ jobs:
1212
uses: actions/setup-java@v1
1313
with:
1414
java-version: 11
15+
- uses: actions/checkout@v2
16+
- name: Check out CLDR
17+
uses: actions/checkout@v2
18+
with:
19+
repository: unicode-org/cldr
20+
path: cldr
21+
- name: Backup Unicodetools and CLDR for jsps
22+
run:
23+
mkdir -p UnicodeJsps/target && tar cfpz UnicodeJsps/target/cldr-unicodetools.tgz ./cldr ./unicodetools
1524
- name: Cache local Maven repository
1625
uses: actions/cache@v2
1726
with:

UnicodeJsps/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ RUN apk add --update -q wget make gcc musl-dev
77
RUN wget -np -nv --reject-regex='.*\.(lib|exe)$' --cut-dirs=4 -nH -r ${CPATH}${CVERSION}/
88
RUN cd source && gcc -I ../include/ -static -Os -o3 -o bidiref1 bidiref1.c brutils.c brtest.c brtable.c brrule.c
99
RUN ls -lh /build/source/bidiref1 && (/build/source/bidiref1 || true)
10+
ADD target/cldr-unicodetools.tgz /tmp/
11+
RUN mkdir /build/data && cd /build/data && tar xfpz /tmp/cldr-unicodetools.tgz && du -sh /build/data/*
12+
RUN rm -rf /build/data/cldr/.git # unneeded
1013
FROM jetty:9-jre11-slim AS run
11-
# FROM tomcat:9-jdk14-openjdk-slim-buster AS run
1214
ADD port-entrypoint.sh /port-entrypoint.sh
1315
ADD ./jetty.d/ROOT /var/lib/jetty/webapps/ROOT/
1416
ENTRYPOINT [ "/port-entrypoint.sh" ]
@@ -21,5 +23,9 @@ ENV BIDIREFHOME /usr/local/share
2123
# copy the bidiref1 bin
2224
ENV BIDIREF1 /usr/local/bin/bidiref1
2325
COPY --from=cbuild /build/source/bidiref1 /usr/local/bin/
26+
COPY --from=cbuild /build/data/cldr /usr/local/lib/cldr
27+
RUN mkdir /usr/local/lib/unicodetools
28+
COPY --from=cbuild /build/data/unicodetools /usr/local/lib/unicodetools/unicodetools
29+
ENV JAVA_OPTIONS -DCLDR_DIR=/usr/local/lib/cldr -DUNICODETOOLS_REPO_DIR=/usr/local/lib/unicodetools
2430
# This is the default PORT. Override by setting PORT.
2531
EXPOSE 8080

0 commit comments

Comments
 (0)