Skip to content

Commit

Permalink
Move environment variables of Tika version and url to separate config…
Browse files Browse the repository at this point in the history
… file for build of all different packages and images so we have not to upgrade multiple files on new Tika releases.
  • Loading branch information
Mandalka committed Dec 20, 2021
1 parent 733696e commit 8923427
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions build-deb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#/bin/bash

TIKA_VERSION=2.2.0
TIKA_URL=https://archive.apache.org/dist/tika/$TIKA_VERSION/tika-server-standard-$TIKA_VERSION.jar


VERSION=`date +%y.%m.%d`
PACKAGE=open-semantic-search_${VERSION}.deb
BUILDDIR=/tmp/open-semantic-search-$$.deb
Expand All @@ -14,7 +10,6 @@ echo "Building ${PACKAGE} in temp directory ${BUILDDIR}"
mkdir ${BUILDDIR}
mkdir ${BUILDDIR}/opt


cp -a DEBIAN ${BUILDDIR}/


Expand Down Expand Up @@ -134,14 +129,19 @@ cp src/solr-synonames/synonames2solr.py ${BUILDDIR}/usr/lib/python3/dist-package
# Include tika-server.deb
#

# read $TIKA_VERSION and $TIKA_URL from config file tika-version.env
source src/tika-server.deb/tika-version.env

# if not yet there, download Tika-server binary release
if [ ! -f "src/tika-server.deb/usr/share/java/tika-server-standard-$TIKA_VERSION.jar" ]; then
echo "Downloading Tika"
wget -P src/tika-server.deb/usr/share/java/ $TIKA_URL
fi

cp -a src/tika-server.deb/etc ${BUILDDIR}/
cp -a src/tika-server.deb/usr ${BUILDDIR}/

mkdir -p ${BUILDDIR}/usr/share/java/
cp src/tika-server.deb/usr/share/java/tika-server-standard-$TIKA_VERSION.jar ${BUILDDIR}/usr/share/java/

ln -s tika-server-standard-$TIKA_VERSION.jar ${BUILDDIR}/usr/share/java/tika-server-standard.jar

Expand Down
2 changes: 1 addition & 1 deletion src/tika-server.deb

0 comments on commit 8923427

Please sign in to comment.