Skip to content
Snippets Groups Projects
Commit a713588f authored by Florent Torregrosa's avatar Florent Torregrosa Committed by Florent Torregrosa
Browse files

Issue #3307783 by Grimreaper: Update docconv install and fix phpstan

parent c5927769
No related branches found
No related tags found
1 merge request!19Issue #3307783: Update docconv install and fix phpstan
......@@ -20,25 +20,25 @@ build:
container_command:
commands:
# Make a change to drupalci.yml when creating a new branch.
# Fix outdated apt key.
- "curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -"
- "apt-get update"
- "apt-get install apt-utils -y"
# Docconv.
# Install Go and Docconv dependencies.
# Install Go.
- "apt-get install curl poppler-utils wv unrtf tidy -y"
- "curl -O https://dl.google.com/go/go1.13.linux-amd64.tar.gz"
- "tar xvf go1.13.linux-amd64.tar.gz"
- "chown -R root:root ./go"
- "mv go /usr/local"
- "/usr/local/go/bin/go get github.com/JalfResi/justext"
- "curl -O https://dl.google.com/go/go1.19.linux-amd64.tar.gz"
- "tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz"
- "chown -R root:root /usr/local/go"
# Install Docconv.
- "/usr/local/go/bin/go get code.sajari.com/docconv/..."
- "cp /root/go/bin/docd /usr/bin/"
- "/usr/local/go/bin/go install code.sajari.com/docconv@v1.2.1"
- "cd /root/go/pkg/mod/code.sajari.com/docconv@v1.2.1/docd && /usr/local/go/bin/go build ."
- "cp /root/go/pkg/mod/code.sajari.com/docconv@v1.2.1/docd/docd /usr/bin/"
# Pdftotext.
- "apt-get install poppler-utils -y"
# Python Pdf2txt.
- "apt-get install python3-pip -y"
- "pip3 install pdfminer.six"
# Used fixed version of pdfminer until CI environment will be updated
# to Debian 11 at least.
- "pip3 install pdfminer.six==20220319"
# Common parts of Tika methods.
- "mkdir -p /usr/share/man/man1"
- "mkdir -p /var/apache-tika"
......
......@@ -45,6 +45,8 @@ class ExtractedFileFieldItemList extends FieldItemList {
/**
* {@inheritdoc}
*
* @phpstan-param int $index
*/
public function get($index) {
if ($index !== 0) {
......
......@@ -3,16 +3,20 @@
apt-get update
# Docconv.
GO_VERSION='1.13'
rm -rf /usr/local/go
rm -rf /root/go
GO_VERSION='1.19'
DOCCONV_VERSION='v1.2.1'
apt-get install curl poppler-utils wv unrtf tidy -y
curl -O https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
tar xvf go${GO_VERSION}.linux-amd64.tar.gz
chown -R root:root ./go
mv go /usr/local
/usr/local/go/bin/go get github.com/JalfResi/justext
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
chown -R root:root /usr/local/go
/usr/local/go/bin/go install code.sajari.com/docconv@${DOCCONV_VERSION}
/usr/local/go/bin/go get code.sajari.com/docconv/...
cp /root/go/bin/docd /usr/bin/
cd /root/go/pkg/mod/code.sajari.com/docconv@${DOCCONV_VERSION}/docd
/usr/local/go/bin/go build .
cd -
cp /root/go/pkg/mod/code.sajari.com/docconv@${DOCCONV_VERSION}/docd/docd /usr/bin/
# Pdftotext.
apt-get install poppler-utils -y
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment