Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Verified Commit a9752c1c authored by hynek's avatar hynek 🤤
Browse files

docs(readme): describe build and test

parent cdfaa9ef
......@@ -7,43 +7,41 @@ This is the main application for SADE. It serves as XAR package according to the
[EXPath Packaging System](http://expath.org/spec/pkg) and is created as an application for
[eXist-db](https://exist-db.org).
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
* ant >= 1.10.0
* ant >= 1.10.0
### Local installation
To get a version of SADE running locally on your computer, clone this repository in your preferred git directory:
```
```sh
mkdir SADE
cd SADE
git clone git@gitlab.gwdg.de:SADE/SADE.git
```
Once the repository is cloned, run
```
ant test
```sh
./build_test
```
which installs all necessary dependencies and creates a local version of SADE in `/test`.
To start the database, run
```
bash test/eXist-db-*/bin/startup.sh
```sh
bash test/exist-distribution-*/bin/startup.sh
```
SADE's backend is now available at `localhost:8080`. To have a look at the website, view `http://localhost:8080/exist/apps/sade/index.html` in your preferred browser.
## The Git repo
This repo contains the sources of the application which contain a brief
documentation as long as you are not dealing with a fork. Please find the
documentation in the folder `docs` where they are stored in Markdown. Any
......@@ -51,50 +49,57 @@ default installation of this package serves the documentation as website
integrated in your template and in your instance.
### Git hooks
The folder `.hooks` contains git hook scripts to be executed on certain git
events. The usage of these scripts is recommended, as they ensure a smooth
workflow.
#### pre-commit
We test for `DONOTCOMMIT` comments in the code. As long as a comment like this
is in files, no commit is possible.
#### post-commit
On any commit a new artifact is being created, so you can proceed and test it
immediately.
## Build
`ant`
```sh
./build_xar
```
Artifacts will be stored in `build/`.
The default artifact is the xar package.
## Test
`ant test` will download the specified version of eXist and all dependencies to
`./build_test` will download the specified version of eXist and all dependencies to
a ready-to-go instance in the `test/` directory. at the first start all tests
will be executed by the `post-install.xq` script. To start the database use
```bash
test/eXist-db-*/bin/startup.sh
```sh
test/exist-distribution-*/bin/startup.sh
```
Guide your favorite browser to the [dashboard](http://localhost:8080/exist/).
### Port settings
When the port 8080 is blocked by a different service, simply set different ones
with the following command and restart the database.
```bash
```sh
sed -i 's/"8080"/"8090"/g; s/"8443"/"8444"/g' \
test/eXist-db-4.5.0/tools/jetty/etc/jetty-http.xml \
test/eXist-db-4.5.0/tools/jetty/etc/jetty.xml \
test/eXist-db-4.5.0/tools/jetty/etc/jetty-ssl.xml
```
## Deploy
We recommend using Debian packages for deployment. There built-in routines
in the ant script. The [CI configuration](.gitlab-ci.yml) has a part to
publish the package at the [DARIAH-DE Aptly Repository](https://ci.de.dariah.eu/packages/pool/snapshots/s/).
## Installation
## Known Issues
In the unlikely event of cycling to the next digit in TextGrid URIs you may
encounter issues when you going to use an older URI together with a newer that
starts with the same characters. Example: One will publish the text
......
Markdown is supported
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