Skip to content
Snippets Groups Projects
Commit 49d0f4fa authored by Demian Katz's avatar Demian Katz Committed by GitHub
Browse files

Install Phing w/ Composer rather than vice versa. (#865)

- Also use Phing for Swagger-UI installation for better cross-platform support.
parent 0ceefb5e
No related merge requests found
......@@ -10,12 +10,10 @@ env:
- VUFIND_HOME=$PWD VUFIND_LOCAL_DIR=$PWD/local
before_script:
- pear install pear/Http_Request2
- pear channel-discover pear.phing.info
- pear install phing/phing
- phpenv config-rm xdebug.ini
- phpenv rehash
- composer install
- npm install -g eslint@"<3.0.0"
script:
- phing composer phpunitfast phpcs-console php-cs-fixer-dryrun eslint
- vendor/bin/phing phpunitfast phpcs-console php-cs-fixer-dryrun eslint
......@@ -12,10 +12,7 @@ Installation
------------
See our [online installation documentation](https://vufind.org/wiki/installation) for step-by-step instructions for installing from packaged releases to popular platforms.
VuFind's [packaged releases](http://vufind-org.github.io/vufind/downloads.html) have all dependencies included. If you are installing directly from a Git checkout, you will need to load these dependencies manually by following these steps from inside VuFind's home directory:
- Load PHP dependencies using the [Composer](https://getcomposer.org) tool by running `composer install`.
- Install Solr using the [Phing](https://www.phing.info/) tool by running `phing installsolr`.
VuFind's [packaged releases](http://vufind-org.github.io/vufind/downloads.html) have all dependencies included. If you are installing directly from a Git checkout, you will need to load these dependencies manually using the [Composer](https://getcomposer.org) tool by running `composer install` from the VuFind home directory.
Documentation and Support
......
......@@ -177,6 +177,24 @@
</if>
</target>
<target name="installswaggerui">
<delete dir="${srcdir}/public/swagger-ui" includeemptydirs="true" failonerror="false" />
<copy todir="${srcdir}/public/swagger-ui">
<fileset dir="${srcdir}/vendor/swagger-api/swagger-ui/dist" defaultexcludes="false" />
</copy>
<reflexive>
<fileset dir="${srcdir}/public/swagger-ui">
<include pattern="index.html" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="defaultModelRendering: 'schema'" replace="defaultModelRendering: 'model'" />
<regexp pattern="url = &quot;.*&quot;" replace="url = &quot;../api/v1?swagger&quot;" />
</replaceregexp>
</filterchain>
</reflexive>
</target>
<target name="composer" description="Install dependencies with Composer">
<httpget url="https://getcomposer.org/composer.phar" sslVerifyPeer="false" dir="${srcdir}" />
<echo message="Installing dependencies..." />
......@@ -187,7 +205,6 @@
<target name="startup" description="install and activate demo">
<!-- get dependencies -->
<phingcall target="composer" />
<phingcall target="installsolr" />
<!-- set up appropriate read/write permissions for Apache -->
<exec command="chmod -R a+w ${srcdir}/local/cache" />
......@@ -344,7 +361,6 @@
<phingcall target="composer">
<property name="composer_extra_params" value="--no-dev" />
</phingcall>
<phingcall target="installsolr" />
<exec command="git archive HEAD --format=tar | tar -x -C ${builddir}/export/vufind/usr/local/vufind" />
<copy todir="${builddir}/export/vufind/usr/local/vufind/vendor">
<fileset dir="${srcdir}/vendor" defaultexcludes="false" />
......@@ -352,6 +368,9 @@
<copy todir="${builddir}/export/vufind/usr/local/vufind/solr/vendor">
<fileset dir="${srcdir}/solr/vendor" defaultexcludes="false" />
</copy>
<copy todir="${builddir}/export/vufind/usr/local/vufind/public/swagger-ui">
<fileset dir="${srcdir}/public/swagger-ui" defaultexcludes="false" />
</copy>
<!-- create a version-specific symlink so that tar/zip packages will have
appropriate directory structures. -->
......
......@@ -18,7 +18,9 @@
"ocramius/proxy-manager": "1.0.2",
"oyejorge/less.php": "1.7.0.9",
"pear/file_marc": "1.1.2",
"pear/http_request2": "2.3.0",
"pear/validate_ispn": "dev-master",
"phing/phing": "2.15.2",
"serialssolutions/summon": "1.0.0",
"symfony/yaml": "2.7.6",
"swagger-api/swagger-ui": "2.2.4",
......@@ -43,6 +45,6 @@
"squizlabs/php_codesniffer": "2.6.0"
},
"scripts": {
"post-update-cmd": "rm -rf public/swagger-ui; cp -r vendor/swagger-api/swagger-ui/dist public/swagger-ui; sed -i.orig \"s/defaultModelRendering: 'schema'/defaultModelRendering: 'model'/\" public/swagger-ui/index.html; sed -i.orig 's/url = \".*\"/url = \"..\\/api\\/v1\\?swagger\"/' public/swagger-ui/index.html"
"post-update-cmd": "phing installsolr installswaggerui"
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment