Skip to content

Commit

Permalink
#977 Setup for different search versions
Browse files Browse the repository at this point in the history
  • Loading branch information
j3nsch committed Feb 6, 2023
1 parent e1ccd6a commit 8a9fdee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: export MYSQL_PWD=root && mysql --default-character-set=utf8 -h 'localhost' -P '3306' -u 'root' -v -e "CREATE DATABASE IF NOT EXISTS opusdb DEFAULT CHARACTER SET = UTF8 DEFAULT COLLATE = UTF8_GENERAL_CI; CREATE USER 'opus4admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; GRANT ALL PRIVILEGES ON opusdb.* TO 'opus4admin'@'localhost'; CREATE USER 'opus4'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; GRANT SELECT,INSERT,UPDATE,DELETE ON opusdb.* TO 'opus4'@'localhost'; FLUSH PRIVILEGES;"

- name: Prepare
run: ant prepare-workspace prepare-test-workspace prepare-config lint reset-testdata -DdbUserPassword=root -DdbAdminPassword=root
run: ant prepare-workspace prepare-test-workspace prepare-config lint reset-testdata -DdbUserPassword=root -DdbAdminPassword=root -DphpVersion=${{ matrix.php-versions }}

- name: Mail-Server
run: php scripts/opus-smtp-dumpserver.php 2>&1 >> tests/workspace/log/opus-smtp-dumpserver.log &
Expand Down
49 changes: 11 additions & 38 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<project name="opus4server" default="build" xmlns:if="ant:if" xmlns:unless="ant:unless">

<property environment="env" />
<property name="phpVersion" value="8.1" />
<property name="testpath" value="" />
<property name="codingstandard" location="${basedir}/vendor/opus4-repo/codesniffer/ruleset.xml" />
<property name="adminPassword" value="AdminAdmin" />
Expand All @@ -18,10 +19,10 @@
<property name="dbAdminPassword" value="" />
<property name="solrIndexHost" value="localhost" />
<property name="solrIndexPort" value="8983" />
<property name="solrIndexPath" value="/solr/opus4" />
<property name="solrExtractHost" value="localhost" />
<property name="solrExtractPort" value="8983" />
<property name="solrExtractPath" value="/solr/opus4" />
<condition property="solrIndexPath" value="/" else="/solr">
<equals arg1="${phpVersion}" arg2="8.1" />
</condition>
<property name="solrIndexCore" value="opus4" />

<target name="analyse-code" depends="phpcs,phpmd,phpcpd,phploc" />

Expand Down Expand Up @@ -123,19 +124,6 @@
<!-- Prepare test configuration. -->
<copy file="${basedir}/tests/config.ini.template" toFile="${basedir}/tests/config.ini" filtering="true"
overwrite="true">
<filterset>
<filter token="db.user.name" value="${dbUserName}" />
<filter token="db.user.password" value="${dbUserPassword}" />
<filter token="db.admin.name" value="${dbAdminName}" />
<filter token="db.admin.password" value="${dbAdminPassword}" />
<filter token="db.name" value="${dbName}" />
<filter token="searchengine.index.host" value="${solrIndexHost}" />
<filter token="searchengine.index.port" value="${solrIndexPort}" />
<filter token="searchengine.index.app" value="${solrIndexPath}" />
<filter token="searchengine.extract.host" value="${solrExtractHost}" />
<filter token="searchengine.extract.port" value="${solrExtractPort}" />
<filter token="searchengine.extract.app" value="${solrExtractPath}" />
</filterset>
</copy>

<!-- Prepare main configuration. Needed for scripts like `bin/opus4`. -->
Expand All @@ -149,27 +137,12 @@
<filter token="db.name" value="${dbName}" />
<filter token="searchengine.index.host" value="${solrIndexHost}" />
<filter token="searchengine.index.port" value="${solrIndexPort}" />
<filter token="searchengine.index.app" value="${solrIndexPath}" />
<filter token="searchengine.extract.host" value="${solrExtractHost}" />
<filter token="searchengine.extract.port" value="${solrExtractPort}" />
<filter token="searchengine.extract.app" value="${solrExtractPath}" />
</filterset>
</copy>

<copy file="${basedir}/application/configs/console.ini.template"
toFile="${basedir}/application/configs/console.ini" filtering="true" overwrite="true">
<filterset>
<filter token="db.user.name" value="${dbUserName}" />
<filter token="db.user.password" value="${dbUserPassword}" />
<filter token="db.admin.name" value="${dbAdminName}" />
<filter token="db.admin.password" value="${dbAdminPassword}" />
<filter token="db.name" value="${dbName}" />
<filter token="searchengine.index.host" value="${solrIndexHost}" />
<filter token="searchengine.index.port" value="${solrIndexPort}" />
<filter token="searchengine.index.app" value="${solrIndexPath}" />
<filter token="searchengine.extract.host" value="${solrExtractHost}" />
<filter token="searchengine.extract.port" value="${solrExtractPort}" />
<filter token="searchengine.extract.app" value="${solrExtractPath}" />
<filter token="searchengine.index.path" value="${solrIndexPath}" />
<filter token="searchengine.index.core" value="${solrIndexCore}" />
<filter token="searchengine.extract.host" value="${solrIndexHost}" />
<filter token="searchengine.extract.port" value="${solrIndexPort}" />
<filter token="searchengine.extract.path" value="${solrIndexPath}" />
<filter token="searchengine.extract.core" value="${solrIndexCore}" />
</filterset>
</copy>
</target>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"jpgraph/jpgraph": "dev-master",
"opus4-repo/opus4-common": "4.7.2.x-dev",
"opus4-repo/framework": "4.7.2.x-dev",
"opus4-repo/search": "dev-4.7.2-zf1f",
"opus4-repo/search": ">4.7.1",
"opus4-repo/opus4-bibtex": "4.7.2.x-dev",
"opus4-repo/opus4-import": "4.7.2.x-dev",
"opus4-repo/opus4-pdf": "4.7.2.x-dev",
Expand Down

0 comments on commit 8a9fdee

Please sign in to comment.